我想要的只是让右列的高度(和图像)依赖于左边。离开高度不断变化的基础上,宽度和右列的高度变化,但他们永远不会相等。CSS相同高度的两个盒子
CSS
div.home-bottomleft, div.home-bottomright {
float:left;
display:table-row;
padding:10px 0;
}
div.home-bottomleft {
width:45.3%;
background: url(/wp-content/themes/jdesign/images/div-separator.png) right no-repeat;
}
div.home-bottomright {
width:54.7%;
}
HTML
<div class="home-bottomleft">
<img class="home-bottom-motive" src="/wp-content/themes/jdesign/images/homepage-motive.png" alt="Bottom Top Motive" /></p>
<p class="book_antiqua home-bottomtext">XX Events is a full-service event planning company in Chicago dedicated to creating an enjoyable and stress-free planning experience for our clients. We are motivated by event trends, inspired by traditions, and fascinated by all of the details that go into a personalized and flawless event!</p>
</div>
<div class="home-bottomright">
<div class="home-brbox"><img class="home-brbox-img" src="/wp-content/uploads/2013/05/XXevents-bottomleftimg.jpg" alt="XXevents" /></p>
<p>Weddings</p>
</div>
<div class="home-brbox"><img class="home-brbox-img" src="/wp-content/uploads/2013/05/XXevents-bottommiddleimg.jpg" alt="XXevents" /></p>
<p>Social Events</p>
</div>
<div class="home-brbox"><img class="home-brbox-img" src="/wp-content/uploads/2013/05/XXevents-bottomrightimg.jpg" alt="XXevents" /></p>
<p>Showers</p>
</div>
</div>
左边的身高一直基于宽度和右列的高度变化也发生了变化,但他们从来都不等于那么,什么是45.3%和右54.7%,左 – underscore
什么ü想成为平等的吗? – underscore
45.3和54.7是这样的,中间的分隔符对应于页面的特定部分并且看起来有组织 – user2330327