I'm having a really frustrating time with a website I'm working on.
Looks great in FF and Chrome.
In IE7 the vertical alignment is not right.
In IE8 all I get is a blank page.
If I use IE 8 compatibility view I have the same issues as with IE 7.
I'm guessing I need seperate stylesheets for each version of IE? Do the conditionals have to be in a certain order?
I've tried a few varriations with conditional comments just with the copies of the files in my computer, but i always seem to end up with either IE7 or IE8 displaying a blank page, I cant seem to get it working in both versions.
I'm stumped and the site owner is not happy. Any ideas?
I'm stumped and the site owner is not happy. Any ideas?
I use separate stylesheets for the browsers I support. I detect which browser is making the page request and then link the appropriate stylesheet. If an unsupported browser makes a page I request, I link the Firefox stylesheet and hope for the best
Thankfully, the differences between browsers nowadays is minimal in my experience, especially if using validated html and css, and so the setting up and maintenance of multiple stylesheets is tiny for me.
I normally set up web page using IE8 as the default browser and then copy and paste the styles to each browser's styleheet - which takes only a few seconds.
On the very few occasions where a page renders slightly differently in a browser I find it quicker to edit the browser's stylesheet rather than waste time editing a common single stylesheet to fix a problem in one browser only to find that it has caused a problem in another.
In my opinion, the correct timing is to style step by step and check all the time with all the browsers. At least use 3 browsers: FF, IE7 and IE8. Try to find a common solution. Usually you will not have problems if you give your elements certain sizes (this is a common mistake)
Usually, if you do code standard and correct, you should rarely get problems (except for IE6, which is a real calamity). You don't need separate CSS files for versions, but you might need some short small separate correction codes, in case there is no proper common solution.
Bookmarks