February 18, 201115 yr Hi there, This is my first post so hello to all! I've been doing some web design in my spare time and have a site up and running, however, I know it doesn't look right in IE 6 and 7. I have done a lot a reading and thought I understood it, but I obviously don't! As a test I have created another CSS file called ie8.css and linked to in using, <!--[if IE 8]> <link rel="stylesheet" type="text/css" href="css/ie8.css" /> <![endif]--> on the index.php page. The ie8.css is exactly the same as the main CSS file except I have removed the background image from the main content box, but when I view the page using IE8 the image is still there so therefore it still must be using the main style sheet?! What am I doing wrong?! The ultimate aim is to have separate sheets for IE 6 and 7, but as I test I am using IE8 becuase I don't have access to IE 6&7 at the moment. Thanks in advance.
February 18, 201115 yr Aha. Right, I can see where you're going wrong. The IE-specific stylesheets should be called after the main stylesheet and should contain ONLY rules to override the main one. For example, to get what you've described you'd want your IE8 sheet to consist of: div#content { background-image: none; } (replacing div#content with whatever yours is called).
February 18, 201115 yr Author Aha. Right, I can see where you're going wrong. The IE-specific stylesheets should be called after the main stylesheet and should contain ONLY rules to override the main one. For example, to get what you've described you'd want your IE8 sheet to consist of: div#content { background-image: none; } (replacing div#content with whatever yours is called). Thanks for the fast reply! It was being called after the main CSS was but there was another sheet been called for my rotator. I moved it below that, removed all other CSS and boom it worked!! Thanks a lot! Edited February 18, 201115 yr by tangerine_dreamer
February 18, 201115 yr Why do you need seperate stylesheets for ie8 7 & 6 ? what problems are you having
February 19, 201115 yr Author Why do you need seperate stylesheets for ie8 7 & 6 ? what problems are you having A few of the margins and padding were rednering slightly different on IE7, and in IE6 it looks a complete mess, but that's going to be work in progress! Thanks again
February 19, 201115 yr Author Did you use a css reset I used my own, but, just having googled ccs reset maybe I should be using a more thorough one likethe eric meyer one. Thanks for the advice.
Create an account or sign in to comment