开发者

making blueprint css working in IE 6 and IE 7

I am using Blue print CSS and it works fine in Firefox...but when I look at it in IE, 开发者_运维知识库even with the for IE lt IE8, it still doesn't seem to be working right in terms of spacing and alignment.

Any suggestions on what I can do to make it look proper?


Make sure that you use a doctype. If you do not it will render in quirks mode. I had the same problem and correcting the doctype worked.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

That should go at the top of the document


Are you including the ie.css file? Below the regular blueprint css files, include the ie.css file, using the notation that only IE will parse:

<link rel="stylesheet" href="../../blueprint/screen.css" type="text/css" media="screen, projection"> 
<link rel="stylesheet" href="../../blueprint/print.css" type="text/css" media="print"> 
<!--[if lt IE 8]><link rel="stylesheet" href="../../blueprint/ie.css" type="text/css" media="screen, projection"><![endif]--> 

Make sure that all the URLs to the CSS files are correct and are working on your site also.


I know this is a bit late, but hopefully it'll help someone who googles it.

A big gotcha when using blueprint here is to ensure that your container div has a class of container, not id:

<div class="container"> ... </div>

Not

<div id="container"> ... </div>

It's caught me out a few times before.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜