html - 内容越界

标签 html css css-float

我正在设计一个列出几本书的页面。我遇到的麻烦是内容有时会超出书籍信息框,比如书名非常长,高度超过 140 像素。我想知道最好的解决方案是什么?下面是我的代码示例。

//css
.book-data{height: 140px; width: 500px};
.book-image{float: left; width: 200px;}
.book-info{float: left; widdth: 300px;}

//html
<div class="book-data">
    <div class="book-image"></div>
    <div class="book-info">content</div>
</div>

<div class="book-data">
    <div class="book-image"></div>
    <div class="book-info">content</div>
</div>

最佳答案

简单如: 溢出:隐藏

http://jsfiddle.net/seler/pyseH/

关于html - 内容越界,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5929743/

相关文章:

jquery - 比较jquery中的元素id

html - inside div 自动适应 li in ie 的宽度

css - 如何将文本环绕在 figcaption 周围

html - 将 2 个 div 设置为彼此相邻

html - 如何使水平对齐的文本和图标在屏幕调整大小时保持一致?

javascript - 使用 jquery 更改 HTML 中标签内的文本值

javascript - 如何平滑地更改元素的值?

html - BootStrap 3 同一行上的两个导航标题

html - 如何仅使用 CSS 而不使用表格来定位它

html - 如何解决固定的表头边框对齐问题