TWSupport - Smooth, Clean Support

  • Post new topic
  • Reply to topic

CSS - Different Result in IE & FF

Share

ankillien
New User

Age: 20
Number of posts: 12
Registration date: 2009-06-01

CSS - Different Result in IE & FF

Post by ankillien on Fri Jun 05, 2009 9:35 pm

Hi All!

While creating HTML pages, the biggest (and the only) problem I face is with CSS. It show a bit different positions in IE and other browsers like FF and Opera.

I just wonder if there is a easy and handy fix for this. Or do we have to write different codes for both i.e. conditional CSS?

Thank You Smile

Jalokim
Designer
Designer

Age: 20
Number of posts: 184
Registration date: 2008-08-06
Computer Specs: HP Pavilion || Vista Home Premium SP1
Additional Specs: Athlon 64 X2 1,9Ghz ,GF 8400 GT, 2 MB, 250GB

Re: CSS - Different Result in IE & FF

Post by Jalokim on Fri Jun 05, 2009 10:04 pm

that is the problem of all designers.
IE fixes ...

IE is an idiotic browser that doesn't understand CSS.
In order to make your page cross browser compatible you need to make a new CSS for IE... and use a <-if IE> code that will overwrite the default CSS.

blame microsoft for their shit browser, and just when we thought we got the hang of IE5 and 6 fixes ... they make IE 8 that is a big piece of sh*t and is totally incompatible


_________________

Placehold
TWS Manager
TWS Manager

Age: 25
Number of posts: 730
Registration date: 2008-04-15
Computer Specs: Windows Vista home premium :: Intel(R) Core(TM) Duo CPU
Additional Specs: T7250 @ 2.00GHz :: 4.00 GD RAM :: NVIDIA GeForce 8400M GT

Re: CSS - Different Result in IE & FF

Post by Placehold on Fri Jun 05, 2009 10:09 pm

Hey,

Unfortunately this is something that designers world wide suffer with on a regular basis, including here at TWS.

IE displays the CSS in a standard format without regards to directional commands where as Firefox etc show the code exactly how it is requested.

To get around this you can add smart tags that are designed to work in versions of IE such as the following examples

For IE6:

_background-color: url ('');




For IE7:

*background-color: url ('');



Usually

#wrapper {

For IE7:

html>body #wrapper {




Personally adding these smart tags to all elements is a bit of a pain so i opt for the second CSS, You can also specify this second CSS or even a third to target certain browser versions

For All IE Versions:

Simply add the following to the head of your html code

<!--[if IE]><link href="http://second.css" rel="stylesheet" type="text/css"><![endif]-->



Targeting IE versions:

<!--[if IE 5><link href="http://third.css" rel="stylesheet" type="text/css"><![endif]-->

Or

<!--[if IE 6]><link href="http://fourth.css" rel="stylesheet" type="text/css"><![endif]-->



You can then use a sandbox such as xenocode to pull up different versions of browsers so you can adjust each CSS so that the page displays exactly how you want it to Smile

Hopefully this will help you out Smile


Regards








Craig


_________________

ankillien
New User

Age: 20
Number of posts: 12
Registration date: 2009-06-01

Re: CSS - Different Result in IE & FF

Post by ankillien on Sat Jun 06, 2009 5:09 am

Thank for replies, Jalokim & Placehold Smile
Nice to know I am not the only victim of IE Razz

So, If I use <!--[if IE]> code, would it ignore my default CSS?
Ned I use different codes for different browsers like IE5, IE6 etc. or only <!--[if IE> would work?

Placehold
TWS Manager
TWS Manager

Age: 25
Number of posts: 730
Registration date: 2008-04-15
Computer Specs: Windows Vista home premium :: Intel(R) Core(TM) Duo CPU
Additional Specs: T7250 @ 2.00GHz :: 4.00 GD RAM :: NVIDIA GeForce 8400M GT

Re: CSS - Different Result in IE & FF

Post by Placehold on Sat Jun 06, 2009 9:20 am

Not a problem at all Smile

Well the < !--[if IE]> code detects what browser your using and then if it detects your using IE it replaces the normal CSS with the one designed to correct the issues and display for IE.

< !--[if IE]> should fix the majority of the issues, There isn't many sites the display in all browsers as it should so i would advise not to worry too much about IE5 or IE6 Smile

Another way to test how your forum is displaying correctly on other browsers is to visit BrowserShots, Select the browsers you want to test the forum/website in tha press 'Submit' within minutes you will have a huge list of screen shots to show how it looks in each O/S and Browser Smile

Regards







Craig


_________________
  • Post new topic
  • Reply to topic

Current date/time is Thu Mar 11, 2010 8:42 pm