Welcome Guest ( Log In | Click here to Register a free account now! )
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.| Important Announcement: We have two terrific contests running on the site that I wanted all our members and guests to know about. The first contest is the HP Magic Giveaway, which is underway as of November 28th. More information can be found at this topic, which will be updated very soon with further information. The second contests, is for the chance to win two Seagate FreeAgent external hard drives. More information about this contest can be found here. These are both amazing contests and I suggest everyone submit an entry for them. - BleepingComputer Management |
![]() ![]() |
Jun 20 2006, 10:10 AM
Post
#1
|
|
![]() Forum Regular ![]() ![]() ![]() Group: Members Posts: 245 Joined: 27-May 05 From: 127.0.0.1 Member No.: 21,516 |
How to make a Tableless 3 Column List using XHTML/CSS Guide Overview The purpose of this guide is to show how a tableless 3 column ordered or unordered list can be achieved utilizing XHTML and CSS. The following example uses no tables and validates according to W3C standards. As is, this model is compatible with all modern browsers. Because it is a pure list, it also degrades organically, making it a totally accesible and search engine friendly method of listing content. Instructions
/* Optional Styles, used for presentation */ body { margin: 100px 0px; padding: 0px; text-align: center; } #content { width: 500px; margin: 0px auto; text-align: left; padding: 0; border: 1px solid #000; background-color: #eee; } a:link { color: #06f; text-decoration: none; } a:hover { color:#f00; text-decoration:underline; } /* End Optional Styles, used for presentation */ /* Essential Styles */ li.col1a, li.col1b, li.col1c, li.col1d, li.col1e { margin-left: 0; /* Column 1 horizontal positoning. Adjust as needed. */ } li.col2a, li.col2b, li.col2c, li.col2d, li.col2e { margin-left: 13em; /* Column 2 horizontal positioning. Adjust as needed. */ } li.col3a, li.col3b, li.col3c, li.col3d, li.col3e { margin-left: 25em; /* Column 3 horizontal positioning. Adjust as needed. */ } #listyles { display: block; /* Needed to make lists behave. */ padding: 0; margin: 0; /* Set body margin and padding to get browsers consistency. */ width: 100%; /* Set to 100% to let the columns determin positioning */ list-style-type: none; } /* Column's 2 and 3 are given negative top margins by taking the number of list items * line-height, this example has 5 list items per column, and a line height of 1.5em: 5 * 1.5= 7.5(add negative margin) = -7.5em. */ li.col2a, li.col3a { margin-top: -7.5em; } #listyles li { line-height: 1.5em; /* This not only spaces the list items, but is is used in the calculation for li.col2a, li.col3a heights. */ }
This post has been edited by nosnhoj#3: Jun 20 2006, 01:18 PM -------------------- When I'm right, I'm right....
And when I'm wrong, I could have been right.... So I'm still right, cause I could have been wrong. |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 4th December 2008 - 04:23 PM |