Section 2 - Basics Section 4 - Advanced Fancy Lists Forms Advanced Tables Frames Style Sheets Background Text, Dimension Border Padding, list Classification Positioning Misc. Multiple CSS You try it Image Maps Section 5 - Publishing Section 6 - Extras Appendices |
In this lesson, you will learn how to change the margins of your paragraphs, the padding in tables, and most noticeably, lists. Hope you find this useful.
Paragraph Margins Suppose you'd like to have a large left margin on a paragraph. Once you had to put it in a table to format it, but css is easier. Here's the code:
This paragraph has been indented on the left side only. It is long enough so that you can see that every line will be indented and it makes the paragraph off-set. I hope this is long enough now. Margins may be specified as right, left, top and bottom. If you'd like to put all four into one tag, you's specify top, right, bottom, left, and the tag would look like this:
Table Cell Padding Similarly to paragraph spaces, you can use style sheets to change the padding on the cell of a table. You can change left, right, top and bottom padding. Here's an example:
<table border=1><tr> <td class="two">This is the first table and cell. It is pretty good for a boring cell.</td></tr></table> <table border=1><tr> <td class="three">This is the second table and cell. Yeay for the second cell.</td></tr></table> And with that you get this:
This page is getting way too long. If you want to see lists, you need to follow this magic link. This page relied heavily on W3schools.com |