iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register

Go Back   WebForumz.com > Resources > FAQ > (X)HTML & CSS
Register All Albums Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read

Author


Jack Franklin
Jack is 15 years old and lives happily in Cornwall, England. Web Design is his passion and he works using xHTML, CSS and PHP to code his websites, with the odd bit of Javascript now and then. In his spare time, Jack enjoys playing Football, rugby, tennis and snooker (but not all at the same time).

RSS Feed

Your Options
My site will not display properly in 'x' browser?

Is your site not displaying quite how you want it to in just one of the browsers? Using a couple of CSS tricks, you can include separate CSS which only certain browsers will use!
IE7

To display CSS for only IE7, you must put all your IE7 styles into a separate style sheet, and use a conditional comment.

The code is:

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

Note: You do not have to duplicate content; IE7 will read both stylesheets, while all other browsers will read just the one.

IE6

Displaying CSS for only IE6 is done in an almost identical way to the way you would do it for IE7. Once again we use conditional comment. This time, the code is slightly different, as it is for IE6, not IE7:

The code is:

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

Those are the two main ones you will need to use. As all web designers will tell you, Firefox and Opera tend to display CSS in the most correct manner, so any changes you need will be nearly always for IE6 and/or IE7.


Related Resources

Members's Comments No Comments. Be the first to comment on and rate this resource.


Search Engine Optimization by vBSEO 3.2.0 RC8