【发布时间】:2017-09-04 17:56:55
【问题描述】:
我尝试制作一个包含 3 个 div 的容器,以使三个盒子水平排列。中心框的顶部和底部不与左侧框对齐,第三个框远低于前两个框。我对此进行了一些研究,但我试图做出的改变并没有改变这一点。
非常感谢!
Link that shows photo of final page and the issue that I am having
HTML代码:
<div class="container">
<div class="left">
<p>
Tarata Community Engagement
</p>
<a href="http://www.onlythebridge.com/?page_id=28" class="tarata" target="_blank"><img src="tarata.jpg" width="400" height="267" alt="Tarata Community Engagement Project" /></a></div>
<div class="center">
<p>
Santa Rosa Community Engagement
</p>
<img src="santa-rosa.jpg" width="400" height="267" alt="Santa Rosa Community Engagement Project" />
</div>
<div class="right">
<p>
Our histories are unique. The places that we root ourselves, the communities that we are part of, and the ways those relationships change over time are both personal and shared experiences.
<br><br>
What place/s are meaningful to you? Why? <br>
What are your roots? What do they mean to you in your life?<br>
How do you carry meaningful places and your roots with you? <br>
What is home to you? <br>
Have you left any places or communities behind, what's that like?
</p></div>
</div>
xhtml 文档中的样式代码:
.container {
width:100%;
height:100%;
text-align:left;
}
.left {
float: left;
margin-left:100px;
max-width: 300px;
}
.center {
float: center;
margin-left: 650px;
max-width: 300px;
}
.right {
float: right;
margin-right: 100px;
max-width: 410px;
}
【问题讨论】:
-
??浮动:中心?您在哪里发现可能是 float 的值?
标签: html css containers