div element excluding lists?

vectorx1

New Member
Messages
2
Reaction score
0
Points
0
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?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
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.
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
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.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
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.
 

Darkmere

New Member
Messages
358
Reaction score
2
Points
0
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.


You can do the same thing with Dreamweaver ... just click the inspect code button
 
Top