Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> CSS

กำหนด Padding ล่างของ Element ด้วย CSS

คุณสมบัติ padding-bottom ใช้กำหนดระยะห่างภายในด้านล่างของ Element รับค่าเป็นความยาวหรือเปอร์เซ็นต์

ตัวอย่าง

<html>
<head></head>
<body>
    <p style="padding-bottom: 20px; border:1px solid red;">
        This is demo content.
    </p>
    <p style="padding-bottom: 20%; border:1px solid red;">
        This is another demo content.
    </p>
</body>
</html>