Welcome to Bucaro TecHelp!

Bucaro TecHelp
HTTPS Encryption not required because no account numbers or
personal information is ever requested or accepted by this site

About Bucaro TecHelp About BTH User Agreement User Agreement Privacy Policy Privacy Site Map Site Map Contact Bucaro TecHelp Contact RSS News Feeds News Feeds

Set an Element's Padding

Padding is the space between the element's content and the element's border. Use the padding property to set an elements padding.

Padding set to 12 pixels

<span style="border-style: solid; border-width: 1px; background-color: #ffff00; padding: 12px;">Padding set to 12 pixels</span>

Use the padding-top property to set just the top padding:

Top padding set to 12 pixels

<span style="border-style: solid; border-width: 1px; background-color: #ffff00; padding-top: 12px;">Top padding set to 12 pixels</span>

Use the padding-right property to set just the right side padding:

Right padding set to 24 pixels

<span style="border-style: solid; border-width: 1px; background-color: #ffff00; padding-right: 24px;">Right padding set to 24 pixels</span>

Use the padding-bottom property to set just the bottom padding:

Bottom padding set to 12 pixels

<span style="border-style: solid; border-width: 1px; background-color: #ffff00; padding-bottom: 12px;">Bottom padding set to 12 pixels</span>

Use the padding-left property to set just the left side padding:

Left padding set to 24 pixels

<span style="border-style: solid; border-width: 1px; background-color: #ffff00; padding-left: 24px;">Left padding set to 24 pixels</span>

Use a shortcut to set the padding for all four sides to different values

padding:10px 20px 5px 25px;

<span style="border-style: solid; border-width: 1px; background-color: #ffff00; padding: 10px 20px 5px 25px;">padding:10px 20px 5px 25px;</span>

Note that the order of values for the shortcut is not the standard left, top, right, bottom. Instead it's: top, right, bottom, left.

More CSS Quick Reference:
• Set the Text Case
• CSS Units of Measurement
• Set the Font Style
• Set an Element's Padding
• Set the border-collapse
• Set List Bullets Position
• Highlight Text
• Set an Element's Margin
• CSS background-clip Property
• How to Define and Apply a Style Class

RSS Feed RSS Feed

Follow Stephen Bucaro Follow @Stephen Bucaro



Fire HD
[Site User Agreement] [Privacy Policy] [Site map] [Search This Site] [Contact Form]
Copyright©2001-2024 Bucaro TecHelp 13771 N Fountain Hills Blvd Suite 114-248 Fountain Hills, AZ 85268