私はまだCSSとページのフォーマットを学んでいて行き詰まっています。本当に助けていただければ幸いです。
これを短くするために、私が達成しようとしていることは次のとおりです。
そして、これは私が代わりに得ているものです:
私はすべてを試したようです。コードは次のとおりです。
<div class="header-parent">
<div class="header-first-column">
<div class="header-cell" id="header-img1">
<img src="../../Content/images/header/header_img1.jpg" />
</div>
<div class="header-cell" id="header-img2">
<img src="../../Content/images/header/header_img2.jpg" />
</div>
</div>
<div class="header-second-column">
<div class="header-cell" id="header-img3">
<img src="../../Content/images/header/header_img3.jpg" />
</div>
<div class="header-cell" id="header-img4">
<img src="../../Content/images/header/header_img4.jpg" />
</div>
</div>
<div class="header-third-column">
<div class="header-cell" id="header-img5">
<img src="../../Content/images/header/header_img5.jpg" />
</div>
</div>
<div class="header-fourth-column">
<div class="header-cell" id="header-img6">
<img src="../../Content/images/header/header_img6.jpg" />
</div>
<div class="header-cell" id="header-img7">
<img src="../../Content/images/header/header_img7.jpg" />
</div>
</div>
そしてCSS:
.header-parent
{
width:900px;
top:10px;
position:absolute;
margin-left:auto;
margin-right:auto;
}
.header-first-column
{
width:219px;
background-color:White;
float:left;
display:block;
}
.header-second-column
{
width:285px;
background-color:White;
float:left;
display:block;
}
.header-third-column
{
width:158px;
background-color:White;
float:left;
display:block;
}
.header-fourth-column
{
width:220px;
background-color:White;
float:left;
display:block;
}
画像自体は、次のようなIDで直接フォーマットしてみました。
#header-img1
{
padding:0 0 0 0;
text-align:center;
}
余白、パディング、フローティング画像を残してみました。何も機能していないようです。ヘルプ?