Todd Budnikas
Mon, 08 Sep 2008 19:16:59 -0700
I need to float elements in a container so that they have the same margin between them.I've seen somewhere a technique how this can be done without additionalclasses, but can only remember part of it. This works in Firefox and Chrome, but not in both IEs: <div ...> <ul> <li>content...</li> <li>content...</li> <li>content...</li> <li>content...</li> <li>content...</li> <li>content...</li> </ul> </div> CSS: I want a 3px margin between the elements: ul {list-style-type:none;margin-left:-3px} ul li {float:right;margin:0 0 3px 3px}While FF and Chrome show me the intended 3 elements x 2 row array in thecontainer div, both IE show a 2x3 matrix. Somehow they get the margin wrong, but I cannot remember how to cure this. Any ideas?
If i understand correctly, you may want to add a width to both the UL and the LI items:
ul {list-style-type:none;margin-left:-3px; width:600px;}
ul li {float:right;margin:0 0 3px 3px; width:196px;}
That should make sure that 3 list items fit inside the 600px wide UL
before wrapping to the next line. Would be easier to say for sure if
there was some code to view.
******************************************************************* List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *******************************************************************