Topic: UL In DIV effecting containing DIV margins (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=27285" title="Pages that link to Topic: UL In DIV effecting containing DIV margins (Page 1 of 1)" rel="nofollow" >Topic: UL In DIV effecting containing DIV margins <span class="small">(Page 1 of 1)</span>\

 
Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

posted posted 01-08-2006 21:55

I have the following:

<div> div on top of nav div below filled black should bump up to div below</div>
<div>
<ul>
<li> ... </li>
</ul>
</div>

They don't bump: top divs bottom should touch bottom divs top. I've tested this by removing the list element in the bottom div to see that they do then touch. I've also undone any style that I may have applied to the list element (incase I was causing it) but to no prevail. Regardless, any style to the list element should happen within the containing div and not effect the layout of the div.

A bug?

reisio
Paranoid (IV) Inmate

From: Florida
Insane since: Mar 2005

posted posted 01-08-2006 23:06

links are better than code snippets, but I have a feeling this will help you:

code:
ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

posted posted 01-08-2006 23:40

Related:
http://www.ozoneasylum.com/27286

..at the time I did not have a sample online. I do not understand why the properties of the UL would have and effect on the containing div.

Karl..

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

posted posted 01-09-2006 09:35

Are you sure it's not simply the margin-collapse in action ? in which case it's absolutely normal and described behavior by the Specifications of CSS 1.0 / 4. Formatting model / 4.1. Block-level elements

What is the style and computed style of your DIVs, UL and LI ? in which browsers do you see a problem ?



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu