...

View Full Version : UL overlaps float:left div (as though it has a negative margin-left)



gusblake
12-16-2009, 07:46 PM
Hi,

I have a list on my page which overlaps a floating menu, causing the bullet points to be displayed inside the menu's border.

I have googled, but didn't find anything useful. I don't think it's the doctype - I have tried HTML 4, XHTML and none - or any error in my CSS.

Firebug displays a left margin relative to its parent, not to the menu div directly to its left, as I'm assuming it should.

Obviously if I add a left margin it will look wrong whenever it's not in line with a floated div.

The problem can be seen here, http://www.threeguesses.co.uk/test.html

The CSS is /index.css

Tested in Firefox, IE8 and Opera - exactly the same.

If anyone's got any ideas on how I could make the visible margin always the same regardless of where the UL is, please let me know.

Cheers,
Gus

Jazzo
12-16-2009, 08:28 PM
Try

ul {
display: block;
}

gusblake
12-16-2009, 08:42 PM
Thanks for the reply; I tried adding display:block but it didn't fix it.

Candygirl
12-16-2009, 09:45 PM
Hello,

ul {list-style-position:inside;}
?

gusblake
12-16-2009, 09:52 PM
Yes that worked, thanks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum