Help:Wiki University Wikitext--Padding
- Nesting Lists
- Broken Links
- Image Embedding
- Image Tooltips & Borders
- Image Links
- Images & Text; Embedding PDF
- Snipping Tool & Paint
- Inline Styling
- Changing Fonts
- Font Colors
- Font Bold-Italics
- Div Tag - Intro
- Width and Height
- Alignment - Horizontal
- Breadcrumb Trails
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 left 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.
- Any container that has padding added will expand to compensate.
Here is our paragraph with 10 pixel padding on all four sides:
- NOTICE the text adapts to the restrictions in width from the padding attribute.
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]