| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Registered User
Join Date: Sep 2005
Posts: 57
|
layout assistance needed
I need some assistance with converting this table setup into a div,ul/li setup. I know how to use ul and li to set four boxs and float it right for one row but how do i do multiple rows, do i just repeat the same ul/li float right and for the top bar how do i float text on the left and right? if someone can put together a quick example. thanks in advance ![]() Last edited by devGOD : 11-08-2007 at 16:24. |
|
|
|
|
|
#2 (permalink) |
|
Biscuit
Join Date: Jun 2006
Location: Ireland
Posts: 976
|
I personally wouldn't use a list for that. I'd create a div class with the info for one box and put it inside a container that'd allow it to loop nicely ie 200px div in a 800px box..float the div left. I did something similar here Smyth Property - Luxury Villas and Apartments in Turkey feel free to use the code "Get out of my face!"
"NO! I'll get in your FACE!" |
|
|
|
#3 (permalink) |
|
Registered User
|
Try this Code:
HTML Code:
|
|
|
|
#4 (permalink) |
|
Senior Member
Join Date: Jan 2005
Posts: 12,340
|
Don't use a <br /> if you can help it. Don't use a clearing element if you can help it. Especially when you're putting a <div> directly inside a <ul>. I'm 95% sure that's invalid HTML. I would do each one as a unique box, defined by a <div> like 2Dfruit suggests. |
|
|
|
#6 (permalink) |
|
Senior Member
Join Date: Jan 2005
Posts: 12,340
|
You need to clear them. There are 3 ways to do this: 1. Use a clearing element like iWonder suggested (though his example is invalid). 2. Float the parent. Floats containing floats will automatically clear. 3. Use the method I prefer - the "clearfix" method. Excellent discussion in the article New clearing method needed for IE7? I ignore the added lines for IE/Mac because I don't bother supporting IE/Mac on any of my sites. Here's what I do currently: In main stylesheet: Code:
Then in my IE-only stylesheet: Code:
|
|
|
|
#7 (permalink) | |
|
Registered User
Join Date: Sep 2005
Posts: 57
|
Quote:
thanks pgo... amazing that fixed it =) |
|
|
![]() |