私は960グリッドのCSSテンプレートを使用しようとしていますが、バナーとフォームのインラインを正しく整理するのに問題があります。私のHTMLで960 grid CSS/html allign right
は、私が持っている:
<div class="container_24">
<div class="grid_24">
<div id="banner">
<div id="searchContainer">
<form style="display:inline" >
<input id="field" name="q" type="text"/>
<div id="delete"><span id="x">X</span></div>
<input id="submit" name="submit" type="submit" value="Search" />
</form>
</div>
</div>
</div>
<div class="clear"></div>
</div>
何が起こるかというと、フォームは、私が欲しいものではありませんこれは、バナーの上にオーバーレイされていることです。私はバナー(ロゴ)を左手の角に、検索フォームを右手の角に置いてください。私が間違っていることの手がかりは?あなたは、グリッドを使用していけないのはなぜ
#banner {
/* width: 950px; */
background: #002147;
-moz-border-radius-bottomright: 10px;
border-bottom-right-radius: 10px;
-moz-border-radius-bottomleft: 10px;
border-bottom-left-radius: 10px;
-moz-border-radius-topleft: 10px;
border-top-left-radius: 10px;
-moz-border-radius-topright: 10px;
border-top-right-radius: 10px;
background-image: url(logo.png);
background-repeat: no-repeat;
background-position: 2% 50%;
padding:left: 10px;
padding: 30px;
margin-top:1px;
}
#searchContainer {
margin-left:10px;
margin-top:10px;
}
#searchContainer_np {
margin-left:90px;
margin-top:10px;
}
#field {
float:left;
width:110px;
height:27px;
line-height:27px;
text-indent:10px;
font-family:Ubuntu, sans-serif;
font-size:1em;
color:#333;
background: #fff;
border:solid 1px #002147;
border-top:solid 1px #002147;
border-right:none;
display: inline-block;
}
#delete {
float:left;
width:16px;
height:29px;
line-height:27px;
margin-right:15px;
padding:0 10px 0 10px;
font-family: Ubuntu,sans-serif;
font-size:22px;
background: #fff;
border:solid 1px #002147;
border-top:solid 1px #002147;
border-right:solid 1px #002147;
border-left:none;
}
#delete #x {
color:#A1B9ED;
cursor:pointer;
display:none;
}
#submit {
color: #6e6e6e;
font: bold 12px Ubuntu, sans-serif;
text-decoration: none;
padding: 6px 12px;
position: relative;
display: inline-block;
text-shadow: 0 1px 0 #fff;
-webkit-transition: border-color .218s;
-moz-transition: border .218s;
-o-transition: border-color .218s;
transition: border-color .218s;
background: #f3f3f3;
background: -webkit-gradient(linear,0% 40%,0% 70%,from(#F5F5F5),to(#F1F1F1));
background: -moz-linear-gradient(linear,0% 40%,0% 70%,from(#F5F5F5),to(#F1F1F1));
border: solid 1px #dcdcdc;
border-radius: 2px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
margin-right: 50%;
border:solid 1px #002147;
border-top:solid 1px #002147;
border-right:solid 1px #002147;
border-left:solid 1px #002147;
}
ありがとうございました。マージン・ライトは問題でした。 – JohnJ