By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,724 Members | 1,655 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,724 IT Pros & Developers. It's quick & easy.

Separating IE5 and IE6

P: n/a
Is there any CSS hack so I can separate Internet Explorer 5 from IE6?

I have the problem that IE5 wrongly (AFAIK) doesn't add padding of
blocks to their width. IE6 adds padding to the width. Mozilla does too.
So does Opera.
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Philipp Lenssen wrote:
Is there any CSS hack so I can separate Internet Explorer 5 from IE6?

I have the problem that IE5 wrongly (AFAIK) doesn't add padding of
blocks to their width. IE6 adds padding to the width. Mozilla does
too. So does Opera.


OK, this is what I found so far...

..navigation3 a
{
width: 185px;
}

html*.navigation3 a
{
width: 158px;
}

http://centricle.com/ref/css/filters/
Apparently this also gets rid of Opera.
Jul 20 '05 #2

P: n/a
Philipp Lenssen wrote:
Is there any CSS hack so I can separate Internet Explorer 5 from IE6?

I have the problem that IE5 wrongly (AFAIK) doesn't add padding of
blocks to their width. IE6 adds padding to the width. Mozilla does too.
So does Opera.


It depends...

<http://msdn.microsoft.com/workshop/author/css/overview/cssenhancements.asp>

"Compliant Behavior

With Internet Explorer 6 or later, when you use the !DOCTYPE declaration
to switch on standards-compliant mode, the width and height properties
specify the distance between the left and right edges and top and bottom
edges of the bounding box, respectively. The border and padding belts
are not included.

Noncompliant Behavior

When the !DOCTYPE declaration does not switch on standards-compliant
mode, as with earlier versions of Internet Explorer, the width property
includes the object's content box, plus the values of the following
properties: border-left, border-right, padding-left, and padding-right."
<http://www.opera.com/docs/specs/doctype/>
"Box-sizing is based on the IE/Windows border-box model in quirks mode

The CSS 'width' property specifies content width. In IE/Win 3.0-5.5 it
specifies content width + padding width + border. The same applies to
the 'height' property. Opera in Quirks Mode emulates this behavior.
Opera 7 and IE/Mac, but unfortunately not IE/Win, support the box-sizing
CSS property proposed for CSS 3. Netscape and Mozilla supports the
equivalent -moz-box-sizing property."

Matthias

Jul 20 '05 #3

P: n/a
Matthias Gutfeldt wrote:
Philipp Lenssen wrote:
Is there any CSS hack so I can separate Internet Explorer 5 from
IE6?
I have the problem that IE5 wrongly (AFAIK) doesn't add padding of

blocks to their width. IE6 adds padding to the width. Mozilla does
too. So does Opera.


It depends...


I'm in standard-compliant mode, so I got the problems.

But after the first construct failed, I got it to work with this:
http://centricle.com/ref/css/filters/tests/sbmh/
..navigation a
{
width: 185px; /* padding manually added to width */
}

..navi\gation a
{
width: 158px;
}
Jul 20 '05 #4

P: n/a
Philipp Lenssen wrote:
Is there any CSS hack so I can separate Internet Explorer 5 from IE6?

I have the problem that IE5 wrongly (AFAIK) doesn't add padding of
blocks to their width. IE6 adds padding to the width. Mozilla does too.
So does Opera.

For best CSS-Hacks concerning browser behavior see
http://tantek.com/CSS/Examples/

Using the low- mid- and high-pass-filter you can distinguish browsers
without dropping standard-compliance.

In your case, the mid-pass-filter should be the tool of choice
(http://tantek.com/CSS/Examples/midpass.html). But to use all of them
will increase the accessibility of your site at best.

greets from the
ICHwesen
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.