Previous Message
Next Message

Layout Problem in IE but not Firefox

Sent by Ingo Chao on 27 March 2005 11:11


Jenny Blake schrieb:
> Help!
> Site: www.manisheriar.com/jenny/services.html


1)
#sidebar a { border: 1px solid #color; padding: 6px; width: 100px; ...}

will result in a box-width of 114px. IE6 will expand li, ul, div#sidebar 
to wrap this <a>.

fix: a width of 96px for #sidebar a (maximum)

2)

A fix within your design is to omit a width dimension in #content.

{
the idea of the design was:

#sidebar { width: 160px; float: left; }
|sidebar|

#content { border-left: 160px ... width:400px; }
|border     content|

should float like this:

||sidebar     content|

the problem in IE6: when you set a width/height dimension or float, the 
object gets "layout". This basically means: the object is rectangular. 
In a 2D plane: no overlapping of non-positioned objects. The content of 
the object expands to the bounding box of this object. The object gets 
its own clearing context.


|sidebar| |border     content|

but this will drop, cause the overall width exceeds to 160+160+400px

|sidebar|
|border     content|

you can't adjust this width in IE6 to fix, try setting a width of 40px 
in #content to see, there would be a sidebar and border side-by-side.

with this 40px example, you could try to position the #content with an 
negative offset to the left:-160px; but with a 400px width, the drop 
will occur before the positioning.

just avoid a width here.
}


> Thank you and Happy Easter!  

Fröhliche Ostern!

Ingo



______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: