เพื่อกำหนดการวัดในพิกเซลหน้าจอด้วย CSS ให้ใช้หน่วย px
ตัวอย่าง:
<html>
<head>
</head>
<body>
<div style="position:relative;left:90px;top:3px;background-color:yellow;">
This div has relative positioning.
</div>
</body>
</html>
เพื่อกำหนดการวัดในพิกเซลหน้าจอด้วย CSS ให้ใช้หน่วย px
ตัวอย่าง:
<html>
<head>
</head>
<body>
<div style="position:relative;left:90px;top:3px;background-color:yellow;">
This div has relative positioning.
</div>
</body>
</html>