我對CSS非常陌生。我有一個問題,我只是用div的打在這裏,我有這些:爲什麼列不會粘在右邊
<html>
<head>
<title>My web page</title>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div id = "first">
<div id= "second"></div>
<div id="third"></div>
<div id="fourth"></div>
<div id="fifth"></div>
<footer></footer>
</div>
</body>
,這是CSS:
#first
{
width:600px;
height:400px;
background-color:#666;
margin:auto;
position:relative;
}
#second
{
width:100%;
height:20%;
background-color:yellow;
position:relative;
}
#third
{
margin:auto;
width:15%;
height:70%;
background-color:#00FF00;
position:relative;
margin-left:0;
display:inline-block;
float:left;
}
#fourth
{
width:70%;
height:70%;
position:relative;
display:inline-block;
margin:auto;
background-color:red;
}
#fifth
{
margin:auto;
width:15%;
height:70%;
background-color:#E0AF00;
position:relative;
display:inline-block;
float:right;
}
footer
{
background-color:black;
height:10%;
clear:both;
}
的問題是,右列,去在下面並且不堅持正確的,問題是什麼?
,我可以看到你是新的HTML :)也 –
是的,我肯定是。 – arocketman