473,413 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

MSIE Windows fudge - why?

width: 50%; /* ie5win fudge begins */
voice-family: "\"}\"";
voice-family:inherit;
width: 46%;

I've seen this fragment several times in various layout examples.
What does it mean, and why is it necessary?

Regards, Alex
Jul 20 '05 #1
2 2551
Alex Bell <ab****@tassie.net.au> wrote:
width: 50%; /* ie5win fudge begins */
voice-family: "\"}\"";
voice-family:inherit;
width: 46%;

I've seen this fragment several times in various layout examples.
What does it mean, and why is it necessary?


http://www.tantek.com/CSS/Examples/boxmodelhack.html

IE gets the CSS box model wrong. In CSS when a width is specified this
is the width of the content, and any padding, borders and margin is
added to that width. But in IE the value given to the width is border
to border, with only margin added in addition to it.

But IE has a bug whereby it can't parse certain CSS comments properly,
so in the above example IE sees the 50% width but not the 46% width.
So different browsers apply different widths, which when combined with
the different box models should give identical final appearances.

However, IE in the above applies to versions up to IE5.5.
IE6 (and Mac IE5 and also Opera 7) can apply either the broken box
model or the correct one depending on which doctype is used in the
document. These browsers are also not fooled by the above trick. So,
only use the above hack if you also use a doctype that pushes those
browsers into Standards mode.

See also:
http://www.hut.fi/~hsivonen/doctype.html
http://centricle.com/ref/css/filters/

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #2
On Mon, 29 Sep 2003 09:20:16 +0100, Steve Pugh <st***@pugh.net> wrote:
Alex Bell <ab****@tassie.net.au> wrote:
width: 50%; /* ie5win fudge begins */
voice-family: "\"}\"";
voice-family:inherit;
width: 46%;

I've seen this fragment several times in various layout examples.
What does it mean, and why is it necessary?


http://www.tantek.com/CSS/Examples/boxmodelhack.html

IE gets the CSS box model wrong. In CSS when a width is specified this
is the width of the content, and any padding, borders and margin is
added to that width. But in IE the value given to the width is border
to border, with only margin added in addition to it.

But IE has a bug whereby it can't parse certain CSS comments properly,
so in the above example IE sees the 50% width but not the 46% width.
So different browsers apply different widths, which when combined with
the different box models should give identical final appearances.

However, IE in the above applies to versions up to IE5.5.
IE6 (and Mac IE5 and also Opera 7) can apply either the broken box
model or the correct one depending on which doctype is used in the
document. These browsers are also not fooled by the above trick. So,
only use the above hack if you also use a doctype that pushes those
browsers into Standards mode.

See also:
http://www.hut.fi/~hsivonen/doctype.html
http://centricle.com/ref/css/filters/

Steve

Thanks, Steve, that gives me something to think about.

Regards. Alex

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jens Fudge | last post by:
Hi I just downloaded all three zipped archives with Oracle 9i for Windows XP. Running setup.exe results in absolutely nothing happening. I have Installed MS Virtual Amchine, and JRE. I have...
5
by: Alex Bell | last post by:
I have a fluid header/two column layout at http://www.members.iinet.net.au/~abell1/test/demo10.htm which works with windows MSIE 5.5 and 6, Mozilla, Netscape, and Opera; and Safari but which...
2
by: mannerfanner | last post by:
In order to reload the opener window from a child window I want to check the parent windows state. The following code works fine in IE and Mozilla: if(top.opener && !top.opener.closed) {...
2
by: Bob | last post by:
I have a customer who has a laptop with XP/SP2/MSIE 6.0.290.2180...etc. Latest version AFAIK. Problems in MSIE. The problems (below) do *not* show up on other XP systems with the exact same rev of...
5
by: S | last post by:
Whew! Thanks for your help on that last post. I actually understand what you wrote. I'm trying not to use these groups as a way to get my code written for me, I really want to understand what...
2
by: James_patageul | last post by:
Hello people i would like to know what mean Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) so what browser it is and what OS it is thank a lot...
1
by: ticmanis | last post by:
Hello, I'm having trouble getting MSIE 6.0 (running on XP SP2) to accept a cookie which works fine in both Firefox and wget. The web server is Boa 0.94.13 (a small embedded server) using PHP...
2
by: kailashchandra | last post by:
<html> <head> <title>PHP Test</title> </head> <body> <?php echo $_SERVER; ?> </body> </html>
2
by: kristin09 | last post by:
Hi guys, I have a windows mobile application that has html pages generated on the fly (some pages have links in them). With the new browser MSIE 6.0 the links on the pages are not read as links....
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.