我无法弄清楚这段代码。
这是我的网站:http ://claireisabelwebb.com/
我在左侧的主导航周围做了包装,并在右侧包含了照片和文字。我在文本/照片容器中有两个“框”。这是该代码:
/* Wrapper for Text and Photo on Home Page */
.wrapper_text_photo{
display:block;
float: left;
background: rgba(0,0,255, .8);
width:800px;
height: 700px;
padding: 20px;
margin-top:20px;
margin-left:10px;
}
/* Photo on Home Page */
.photo_home {
float: left;
margin-right:10px;
}
/* Text on Home Page */
.home_text{
display:block;
background: rgba(255,255,255,.75);
width:800px;
height: 400px;
}
这是html:
<div class="wrapper_text_photo">
<!-- Picture of Me __________________________________________-->
<img class="photo_home" src="images/Home/claire-ed.jpg" alt="claire isabel webb" height="200px">
<!-- Text ___________________________________________________-->
<div class="home_text">
<p>I graduated in 2010 from Vassar College with departmental honors in astronomy. I also minored in philosophy and discovered a late interest in architecture and art history. ETC
<br><br>
Email me at claire.isabel.webb@gmail.com.
<br>
</p>
</div>
</div>
我希望文本框与图像对齐,但无论我如何使用填充和边距,我似乎都无法正确处理。
谢谢你 !