คุณสมบัติ float
ใช้ float: right หรือ float: left เพื่อจัดวางองค์ประกอบชิดขอบขวาหรือซ้าย เนื้อหาอื่นจะพับล้อมรอบ
ตัวอย่าง
<!DOCTYPE html>
<html>
<head>
<style>
.demo {
float: right;
width: 200px;
border: 1px dashed blue;
padding: 5px;
}
</style>
</head>
<body>
<h1>Heading</h1>
<div class="demo">
<p>This is demo text and right aligned.</p>
</div>
</body>
</html>