Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- Fixed Side Menus with CSS


theonliest - 3:42 pm on Feb 11, 2003 (gmt 0)


OK for the record here's an abbreviated verion of the code that gave me problems;
on the stylesheet-

div.problembox{
position:absolute; width: 433px;
padding: 5px; margin: 0px; border: 1px
voice-family: "\"}\"";
voice-family:inherit;
width:421px;
}

html>body .problembox {
width:421px;
}

IE5.5 misinterprets this div width by placing the padding and border 'inside' the width instead of adding it on, as it should according to CSS1 specifications.
Tanteks 'box model hack' is the bit from 'voice family...' to the end, it makes little or no sense to me, but it works; it tells IE5.5 that the div width is 433px and IE6 that the div width is 421px (to which it then adds the 12px of padding and border) and so the box should render the same in both browers which it does! hooray!
however it does NOT render the same in IE6 with no dtd, basically the div is about 10px narrower than it should be!
this is the problem that tested my sanity in the first place.
if anyone wants to try that code be my guest!


Thread source:: http://www.webmasterworld.com/css/560.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com