English 中文(简体)
IE6 固定住所停工
原标题:centered fixed width layout breaking in IE6
  • 时间:2010-01-26 00:29:33
  •  标签:
  • css

我通常使用这一法典。

div#wrapper{width:900px; margin: 0 auto;}

div#header{float:left; width: 900px;}

div#sidebar{float:left; width: 300px;}

div#content{float:left; width:600px;}

div#footer{float:left; width: 900px; clear:both;}

我有这个标志

<div id="wrapper">
 <div id="header"></div>
 <div id="sidebar"></div>
 <div id="content"></div>
 <div id="footer"></div>
</div>

IE6中的布局:整个布局向左边浮动!

是否有这方面的知识?

EDIT: layout is valid; centering works in IE7 and 8 (but breaks in quirks)

EDIT here s how it looks in quirks mode alt text http://www.freeimagehosting.net/image.php?2646ed5285.png

最佳回答

你们需要申报一种手法。

任何种类都将如此。

(checked)

问题回答

相反,这种争执毫无道理,只能举手脚,更复杂地混淆了IE6。

div#wrapper{width:900px; margin: 0 auto;}
div#header{width: 900px;}
div#sidebar{float:left; width: 300px;}
div#content{margin-left: 300px; width:600px;}
div#footer{width: 900px; clear:both;}

和加比语一样,一种模棱两可的陈词滥调。 在你的文件顶端进行这项审判:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

Drop down background url in Safari Issue

selectBox.selectCSS { background: url(/Images/replacementSelectBackground.png) top left no-repeat height:auto; } I have an issue in Safari only where the image is not rendering on top ...

CSS specific for Safari

How do you target specifically safari in css with styles?

Aligning textarea in a form

Ive used the following css code to align my form elements: form { position:relative; } form input { position:absolute; left:11em; } However, the textarea element is not aligned correctly with the ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

CSS problem with page footer

I have defined my page footer in the css file as: #footer { position: absolute; height: 50px; text-align: center; background: #66CCCC; bottom: 0px; left: 0px; width: 100%; height: ...

热门标签