Hey all my website www.heavylinker.com works nice in Firefox, Opera, Sa开发者_JAVA百科fari and Chrome. But when it comes to IE it all messes up... I use CSS codes...
Any Ideas?
Without seeing a snippet of code it's impossible to diagnose the problem but in many cases with IE you can solve your problems by using a DOCTYPE declaration at the top of your HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
...
Other than that you're probably using features IE doesn't support.
You do not have an opening HTML tag.
<html> <!--This is the tag you are missing -->
your IE conditional comment is also messed up. it should be:
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="ie-only.css" />
<![endif]-->
the rel="stylesheet" is what was missing/wrong.
The first step towards browsers compatibility is to use the W3C free tools to analyze your code.
This is a report for your website:
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.heavylinker.com%2F&charset=%28detect+automatically%29&doctype=Inline&group=0
The CSS validator is a wonderful tool, too:
http://jigsaw.w3.org/css-validator/
You might consider c-css.php (have a look at http://www.sprymedia.co.uk/article/Conditional-CSS).
With that you're able to code for different browsers in one css file. For me personally, a call it my best friend for css coding
精彩评论