私は、左の余白に1つ、右の余白に1つ、2つの画像を持っています。私は2つの要素を中央に合わせるように中央に配置したいと思います。パディングがすぐに浮動しているときに、どうすれば使用できますか?
しかし、私が右に持っているボックスが左に揃うように浮いているので、私のパッディング権はそれを押しても機能しません。ここで
I want to center these two things
は私のコードです:<section id="content1">
<a href="#"><img src="images/matcha.jpg" alt="pic1" width="300" height="300" /></a>
<div class="box1">
<div class="heading1">
<p>GREEN TEA LOVE</p>
</div>
<div class="paragraph1">
<p>Top Impression Bakery Cafe has been on my go-to list for awhile since I saw their
Green Tea Croissant on Instagram. If you know me well you would know that I'm a huge
fan of anything Matcha and if anything is Matcha related I've got to try it!</p>
</div>
</div>
</section>
CSS:
#content1{
padding-top:50px;
padding-bottom:30px;
width: 960px;
}
.box1{
width:500px;
height:300px;
background:-moz-linear-gradient(top, #77ebcf 20%, #ffffff 20%);
border-style:solid;
float:right;
}
私は一つだけの画像と '' タグは終了スラッシュを持つべきではありません参照してください。 – Rob