473,396 Members | 2,011 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,396 software developers and data experts.

CSS workaround for IE4 and IE5

Hello everyone,

The following website looks fine on the latest IE5, IE6 and Firefox.
However, in older versions of Internet Explorer, the menu overlaps the
text. Does anyone know why this is, or if there is some sort of a
workaround such that it looks good for all browsers?

Site: http://www.hansstolp.nl/nieuws.php
CSS: http://www.hansstolp.nl/templates/style.css

Thanks for any help!

--
Daan
Jul 20 '05 #1
9 2034
On Sun, 12 Sep 2004 15:37:33 +0200, Daan <d_*****@nospamhotmail.com>
wrote:
The following website looks fine on the latest IE5, IE6 and Firefox.
However, in older versions of Internet Explorer, the menu overlaps the
text. Does anyone know why this is, or if there is some sort of a
workaround such that it looks good for all browsers?


Do you have a special reason for wanting to support IE4? IE versions up
to 4 and Netscape versions up to 4, all put together, make up barely 1%
of most readerships these days, and are decreasing every month.

I would recommend that you simply make sure your pages are readable in
those browsers, without worrying about them looking particularly good.
The simplest way is to hide the CSS from them completely by using
@import.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #2
Stephen Poley wrote:
On Sun, 12 Sep 2004 15:37:33 +0200, Daan <d_*****@nospamhotmail.com>
wrote:

The following website looks fine on the latest IE5, IE6 and Firefox.
However, in older versions of Internet Explorer, the menu overlaps the
text. Does anyone know why this is, or if there is some sort of a
workaround such that it looks good for all browsers?

Do you have a special reason for wanting to support IE4? IE versions up
to 4 and Netscape versions up to 4, all put together, make up barely 1%
of most readerships these days, and are decreasing every month.

I would recommend that you simply make sure your pages are readable in
those browsers, without worrying about them looking particularly good.
The simplest way is to hide the CSS from them completely by using
@import.


Well, if IE4 is not supported, I can live with that. But since my uncle
(who I made this site for), uses an older version of IE5 (I think
IE5.01), I want the site to look good in that version, as well as the
newer browsers. I've seen some hacks for different browser versions in
sample CSS codes before, but I wouldn't know how to implement which hack
in this case.

--
Daan
Jul 20 '05 #3
On Mon, 13 Sep 2004 14:37:45 +0200, Daan <d_*****@nospamhotmail.com>
wrote:
Stephen Poley wrote:
On Sun, 12 Sep 2004 15:37:33 +0200, Daan <d_*****@nospamhotmail.com>
wrote:
The following website looks fine on the latest IE5, IE6 and Firefox.
However, in older versions of Internet Explorer, the menu overlaps the
text. Does anyone know why this is, or if there is some sort of a
workaround such that it looks good for all browsers?


Do you have a special reason for wanting to support IE4? IE versions up
to 4 and Netscape versions up to 4, all put together, make up barely 1%
of most readerships these days, and are decreasing every month.

I would recommend that you simply make sure your pages are readable in
those browsers, without worrying about them looking particularly good.
The simplest way is to hide the CSS from them completely by using
@import.


Well, if IE4 is not supported, I can live with that. But since my uncle
(who I made this site for), uses an older version of IE5 (I think
IE5.01), I want the site to look good in that version, as well as the
newer browsers. I've seen some hacks for different browser versions in
sample CSS codes before, but I wouldn't know how to implement which hack
in this case.


OK, for IE5 you typically have to play around with values for width and
padding, as it uses a broken CSS box-model. Once you've worked out what
you need, you place the IE5-specific bits first, then the Tantek hack,
then the values for other browsers. See
http://w3development.de/css/hide_css_from_browsers/ for details of the
hack.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #4
Stephen Poley <sb******************@xs4all.nl> writes:
OK, for IE5 you typically have to play around with values for width and
padding, as it uses a broken CSS box-model. Once you've worked out what
you need, you place the IE5-specific bits first, then the Tantek hack,
then the values for other browsers. See
http://w3development.de/css/hide_css_from_browsers/ for details of the
hack.


For IE5 I think a conditional comment might be a better way of doing
things. Partly because the Tantek hack looks really ugly [1], mainly
because it fools other things with good box models.

For example
main.css
div.box {
width: 10em;
padding: 1em;
}

ie5.css
html div.box {
width: 12em;
padding: 1em;
}

[1] The other hacks just involve odd selectors, or mysterious empty
comments, or similar. The Tantek hack, effective as it is, puts an
ugly mess in the middle of a style block. And I'm not sure what would
happen to something that couldn't deal with Tantek hacks but could
deal with whatever dummy rule you happened to put in.

--
Chris
Jul 20 '05 #5
On 14 Sep 2004 11:49:58 +0100, Chris Morris <c.********@durham.ac.uk>
wrote:
Stephen Poley <sb******************@xs4all.nl> writes:
OK, for IE5 you typically have to play around with values for width and
padding, as it uses a broken CSS box-model. Once you've worked out what
you need, you place the IE5-specific bits first, then the Tantek hack,
then the values for other browsers. See
http://w3development.de/css/hide_css_from_browsers/ for details of the
hack.
For IE5 I think a conditional comment might be a better way of doing
things.


Perhaps. The disadvantage is that the rules for a given style get spread
across two source files (three, if you've also got a simplified version
for Netscape 4) which makes maintenance a little harder. As always there
is a trade-off, and it largely comes down to personal preference.
Partly because the Tantek hack looks really ugly [1], mainly
because it fools other things with good box models.


Which do you have in mind? The only candidate I can think of might be
Amaya, which I've never tried. Is it any good?

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #6
Stephen Poley <sb******************@xs4all.nl> writes:
On 14 Sep 2004 11:49:58 +0100, Chris Morris <c.********@durham.ac.uk>
wrote:
Partly because the Tantek hack looks really ugly [1], mainly
because it fools other things with good box models.


Which do you have in mind? The only candidate I can think of might be
Amaya, which I've never tried. Is it any good?


Amaya...can't remember. It currently crashes on my machine so I can't
test it either.

I think it was Opera 5 that needed a reverse hack (html>body, I think
is the common one) to get it to work again without breaking IE. I
suspect usage of that browser is sufficiently low not to need to
worry, though (I've not seen a single one in access logs this year; if
only Netscape 4 had died so quickly).

--
Chris
Jul 20 '05 #7
On 14 Sep 2004 13:19:48 +0100, Chris Morris <c.********@durham.ac.uk>
wrote:

I think it was Opera 5 that needed a reverse hack (html>body, I think
is the common one) to get it to work again without breaking IE. I
suspect usage of that browser is sufficiently low not to need to
worry, though (I've not seen a single one in access logs this year; if
only Netscape 4 had died so quickly).


The "Be kind to Opera" rule is standard advice, though. Has been for years.
Jul 20 '05 #8
On 14 Sep 2004 13:19:48 +0100, Chris Morris <c.********@durham.ac.uk>
wrote:
Stephen Poley <sb******************@xs4all.nl> writes:
On 14 Sep 2004 11:49:58 +0100, Chris Morris <c.********@durham.ac.uk>
wrote:
>Partly because the Tantek hack looks really ugly [1], mainly
>because it fools other things with good box models.
Which do you have in mind? The only candidate I can think of might be
Amaya, which I've never tried. Is it any good?


Amaya...can't remember. It currently crashes on my machine so I can't
test it either.

I think it was Opera 5 that needed a reverse hack (html>body, I think
is the common one) to get it to work again without breaking IE.


Ah yes - I'd forgotten that. Thanks.
I
suspect usage of that browser is sufficiently low not to need to
worry, though (I've not seen a single one in access logs this year;
I think so. I suspect there may be quite a few people with older
computers who try to hang on to Opera 6 for a while, because it was very
fast, and Opera 7 is noticeably slower. But I think Opera 5 can probably
now be ignored. (I've just rechecked a page I used Tantek on in Opera 6,
and it looks OK.)
if only Netscape 4 had died so quickly).


Or IE 6 ......

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #9
Neal <ne*****@yahoo.com> writes:
On 14 Sep 2004 13:19:48 +0100, Chris Morris <c.********@durham.ac.uk>
wrote:
I think it was Opera 5 that needed a reverse hack (html>body, I think
is the common one) to get it to work again without breaking IE. I
suspect usage of that browser is sufficiently low not to need to
worry, though (I've not seen a single one in access logs this year; if
only Netscape 4 had died so quickly).


The "Be kind to Opera" rule is standard advice, though. Has been for years.


Yes, I know. I just feel silly using a hack that needs another hack to
undo the problems caused by the first hack.

--
Chris
Jul 20 '05 #10

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

Similar topics

2
by: HI-Lab * the Social Technology | last post by:
Is there another function or a workaround to have same results of html_entity_decode in php 4.1.x? Thanks. -- ======================================= HI-LAB the Social Technology...
1
by: klappnase | last post by:
Hello everyone, there have already been a couple of threads about IDLE's sometimes annoying disability to use special characters (in my case I would like to use for example german umlauts like...
6
by: Chris | last post by:
hi, to convert excel files via csv to xml or whatever I frequently use the csv module which is really nice for quick scripts. problem are of course non ascii characters like german umlauts, EURO...
0
by: Jonas Smithson | last post by:
<div style="position: relative;> <!-- I'm the parent --> blah blah blah <div style="position: absolute; bottom: 0;> <!-- I'm the child --> blah blah blah </div> </div> The bottom of the...
1
by: Ronaldo N | last post by:
I'm trying to do some javascript form validation and I've discovered a rather difficult situation to handle with IE. Let's say there's a form with three input fields named "name", "method", or...
7
by: Justin Shen | last post by:
the output of the following codes is "greater than zero", which is rather strange! the correct one should be "not greater than zero" int a = 0x79de61c0; //2044617152; a += 0x12345678; //a is...
9
by: Mickey Segal | last post by:
The long-simmering Eolas patent dispute: http://www.microsoft.com/presspass/press/2003/oct03/10-06EOLASPR.mspx has led to an optional Microsoft Update: http://support.microsoft.com/kb/912945/en-us...
1
by: slyi | last post by:
Hi All, Does anyone use vml to force the printing of background-colors in IE clients? Regards, slyi eg: <html xmlns:v="urn:schemas-microsoft-com:vml" >
37
by: Allen Browne | last post by:
If you develop for others, you probably have multiple versions of Access installed so you can edit and create MDEs for clients in different versions. This works fine under Windows XP, even with...
0
by: William Johnston | last post by:
Hi, A support technician proposed a workaround to black images created for thumbnails. The code to create a thumbnail is below: //passes results to Response.OutputStream private void...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.