I'm trying to enclose some <ul> elements in a div and in the preview in my editor it shows it working fine. However, when I open the page in a browser, the div doesn't go all the way down to the <ul> elements. Anyone know why this is happening?
I'm trying to enclose some <ul> elements in a div and in the preview in my editor it shows it working fine. However, when I open the page in a browser, the div doesn't go all the way down to the <ul> elements. Anyone know why this is happening?
Give us a URL to look at.
Nothing is always absolutely so.
The reason is because of the "float" on the ul which takes it out of the normal layout.
Sorry, but don't remember how to fix it, but a Google search might help.
Nothing is always absolutely so.
The answer is the same as the one in this thread. The problem may be self-correcting once you add more (unfloated) content to the div, or you may need to use a clearfloat element if all of the content is floated.
“Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
"It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)
Seems he found the fix.
Added overflow:auto; to the style of the enclosing div.
If you view a development page in Firefox with Firebug installed, you can right click on an element and "Inspect element" and see a lot of information and edit/test changes in the browser.
Nothing is always absolutely so.