tags:

views:

64

answers:

3

http://mibsoftware.us/clients/dogwatch/dogwatch.html

I am having the hardest time trying to figure out why my last li item is being pushed to the bottom in IE. I have the width, height set for the container. The li has padding/margin to 0. Li is float left. Still being pushed down. Seeking a Guru to help a n00b here.

+1  A: 

Try putting margin:0 to the ul rule ..

The automatic margin the IE assigns, decreases the width available to contain the floated elements, and so they wrap ...

Gaby
Better still, use a reset style sheet -http://meyerweb.com/eric/tools/css/reset/
Dan Diplo
I agree, using reset-style-sheets saves from many headaches, but on the other hand, i also find important to know how/why something works (or not). ( *even if it is in IE :)* )
Gaby
A: 

Float the LIs, don't make them inline.

#widget_container ul {
    padding:0;
    list-style-type:none;
    }
#widget_container ul li {
    padding:0;
    margin:0;
    float:left;     
    }
Diodeus
I've added your code yet it's still pushing items to the bottom?
HollerTrain
ah nm, Gaby's fix fixed it :)
HollerTrain
-1: why would he switch a correct approach to one that doesn't even change anything and adds `clear: left;` needs?
ANeves
I've always used a CSS reset, which is why the fix was non-obvious to me.
Diodeus
A: 

Your example page is completely invalid. Try adding a doctype, html, head and body tags and try again.

(Having said that, it looks fine in IE.)

graphicdivine