Help:Wiki University HTML-- Padding
- Nesting Lists
- Fonts - Changing
- Font Size
- Font Colors
- Font Bold-Italics
- Width and Height
- Tables - Borders
- Tables - Widths
- Tables - Captions
- Tables - Col Labels
- Tables - Cells
- Tables - Rows
- Tables - Placement
- Tables - Sorting
- Tables - Scrolling
- Tables - Col Only
- Tables - Col Spans
- Tables - Row Spans
- Infobox - Creating
- Infobox - Placing
- Infobox - If function
- Position - Relative
- Position - Absolute
Padding[edit | edit source]
Consider the paragraph from the previous lesson.
You can see there is NO space between the text and the border. The text is right up against the border. A little space between the text and the border would probably help it look better.
Padding attribute[edit | edit source]
We use the padding attribute to add a little space between the text and the border:
- The padding is on all four sides of the paragraph.
- Padding is called out in pixels.
Here is our paragraph with 10 pixel padding on all four sides:
- That looks better.
Limit padding[edit | edit source]
We can limit padding to one or more sides. To pad only the left side use:
- NOTICE padding is only on the left side.
On two sides, you could use:
The padding attributes for each of the four sides are:
Try these out[edit | edit source]