I have an external CSS file name main.css. The ID of nav and footer are working fine but the ID of header doesn't work. When I put the header part in HTML file, it works.
Why does it not work in CSS file.
HTML File:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="main.css">
<meta charset="UTF-8">
</head>
<body>
<div id="header">
<h1>Furkan İlhan</h1>
</div>
<div id="nav">
Hakkında<br>
Kariyer<br>
</div>
<div id="footer">
Tüm Hakkı Saklıdır. Furkanilhan.com
</div>
</body>
</html>
CSS File:
<style>
#header {
background-color:black;
color:white;
text-align:center;
padding:5px;
}
#nav {
line-height:30px;
background-color:#eeeeee;
height:300px;
width:100px;
float:left;
padding:5px;
}
#footer {
background-color:black;
color:white;
clear:both;
text-align:center;
padding:5px;
}
</style>