下面是HTML:不能得到浮球左/右爲一個div在Internet Explorer中工作
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="styles.css"/>
<title></title>
</head>
<body>
<div align="center">
<div id="main-header-content" class="content">
<div class="left">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh
euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad
minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut
aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in
vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla
facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent
luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber
tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod
mazim placerat facer possim assum.
</div>
<div class="right">
<div class="left">
<img src="http://www.mywebk9.com/images/question.png" alt="Questions"/>
</div>
<div class="right">
<span class="small-text">Lorem ipsum dolor sit amet</span>
</div>
</div>
</div>
</div>
</body>
</html>
和styles.css的:
*
{
margin: 0;
padding: 0;
}
body
{
font-family: Verdana;
font-size: 8pt;
}
div.content
{
width: 585px;
}
div#header-content div
{
padding: 20px;
text-align: justify;
}
div#main-header-content > div.left
{
padding-left: 40px;
padding-right: 7px;
text-align: justify;
width: 350px;
}
div#main-header-content > div.right
{
padding-left: 7px;
padding-right: 15px;
width: 165px;
}
div#main-header-content div.right div.left
{
width: 20px;
}
div#main-header-content div.right div.right
{
text-align: left;
width: 142px;
}
div.left
{
float: left;
}
div.right
{
float: right;
}
.small-text
{
font-size: smaller;
}
這在FF和鉻的罰款。它應該是兩列,一列有文字,另一列有圖標和少量文字。我怎樣才能使這項工作在IE瀏覽器?我嘗試了div清除=這兩件事,這是沒有做任何事情。
而且upvotes的人誰可以給我如何編寫跨FF,Chrome和IE瀏覽網頁和使用風格的一些技巧> = 7
W00t!這個小東西解決了它! – DJTripleThreat 2009-09-18 20:36:54