SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
Thread: Box Model Hack Problems
-
Sep 10, 2003, 21:37 #1
- Join Date
- Nov 2002
- Posts
- 142
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Box Model Hack Problems
Code:#frame { width:742px; voice-family: "\"}\""; voice-family: inherit; width:740px; border-style:solid; border-width:1px; border-color:#000000; margin-right:auto; margin-left:auto; } html>body #frame {width:740px;}
According to Tantek's hack, this should do it. However, when I run Quirks mode, the div stays 740px wide, including the border. I need those extra 2px, or the layout is out of whack. What am I doing wrong? Help!
-
Sep 11, 2003, 04:14 #2
- Join Date
- Apr 2003
- Location
- Bath, UK
- Posts
- 353
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Remember everything after the voice-family is ignored in quirks mode so with this you shouldn't have a border with your CSS. Try
Code:#frame { border-style:solid; border-width:1px; border-color:#000000; margin-right:auto; margin-left:auto; width:742px; voice-family: "\"}\""; voice-family: inherit; width:740px; } html>body #frame {width:740px;}
-
Sep 11, 2003, 14:26 #3
- Join Date
- Jan 2003
- Location
- Hampshire UK
- Posts
- 40,556
- Mentioned
- 183 Post(s)
- Tagged
- 6 Thread(s)
Hi,
Yes IE6 in quirks mode uses the broken box model but however it does understand the voice family hack (unlike ie5) and then dutifully feeds itself back the wrong dimensions.
So the voice family hack is no good to use in quirks mode.
Paul
-
Sep 12, 2003, 02:47 #4
- Join Date
- Apr 2003
- Location
- Bath, UK
- Posts
- 353
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Although you can still get round it by using extra div's so that you don't have padding and borders on div's with widths.
Still I recon it is easier to add a DOCTYPE and have IE6 work in non-quirks mode.
Bookmarks