私は純粋なCSSレイアウトを試しています。すぐに私は立ち往生してしまいました。しかし、IEで私は、次の取得インターネットエクスプローラで私の基本CSSレイアウトが正しく表示されないのはなぜですか?
:
私はChromeでこれを表示すると、私は期待していたレンダリングを取得<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Layout</title>
<link type="text/css" href="site.css" rel="stylesheet" >
</head>
<body>
<div id="header">
<a href="#" id="logo">My Site</a>
<div id="search-area">
<form>
<input type="text" id="search-box" />
<input type="submit" value="Search" />
</form>
</div>
</div>
<div id="sidebar">
Account Name <br>
<a href="#">Edit My Account</a>
</div>
</body>
</html>
#header {
background-color: #151B54;
height: 30px;
width: 100%;
}
#logo {
position: relative;
left: 10px;
color: white;
font-size: x-large;
font-weight: bold;
text-decoration: none;
float: left;
margin-top: 3px;
}
#search-area {
position: absolute;
left: 200px;
margin-top: 3px;
}
#sidebar {
float: left;
width: 100px;
border-right: double;
}
:私は、次のHTMLとCSSを持っています
サイドバーの左側に大量の空白があることに注意してください。 IEでなぜそれが表示されていますか?
悪い、更新済み – KallDrexx
どのバージョンのIEが影響を受けますか? – Knu
は、ほとんどのブラウザで常にCSSリセットを使用しています。 – Ehtesham