Jump to content

Browser issues....


waggawagga@live.ca

Recommended Posts

Hi folks,I created a site using Firefox to check my design. Upon completing the site I ran it through IE and found some glaring issues with the divs...they fell apart somewhat. I had heard of adding the following code to the head, to redirect any IE browser users to another stylesheet... this code being: <!--[if IE]> <link rel="stylesheet" type="text/css" href="all-ie-only.css" /><![endif]-->I placed it in the head. It didn't work. Upon checking the site in IE, IE was still breaking my style. I placed it all over the head....didn't work, it didn't reference the IE stylesheet when I viewed the site in IE. Is this a valid piece of code? If not...is it possible to reference a second stylesheet by directing IE or any other offending browser, to an alternate stylesheet?Thanks :)

Link to comment
Share on other sites

That will work if1. it comes after your normal stylesheet2. it is written so that it completely overrides every value in the normal stylesheet that causes problems. (That means knowing exactly which ones cause the trouble. Not so easy when they interact so closely.)Alternatively, have a 100% complete IE stylesheet, wrapped in conditionals as you are doing, and wrap the normal stylesheet in a [if !IE] conditional, so that IE completely ignores it:<!--[if !IE]><link rel="stylesheet" type="text/css" href="normal.css" /><![endif]-->The best solution is really to figure out what's going wrong and write the stylesheet so it accommodates all browsers. This is what experienced developers do, and what your goal should be. It is more possible than you probably think.

Link to comment
Share on other sites

In both posts, you have not posted any links or code, so there is really no more help we can give you at this point without even knowing what the problem looks like, other than to tell it can probably be done with only one stylesheet. As has been said, identifying the actual source of the problem is step 1.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...