gpt4 book ai didi

html - 文本和图像中的 float 内容框 [css]

转载 作者:太空宇宙 更新时间:2023-11-04 05:24:55 25 4
gpt4 key购买 nike

我知道这可能是一个简单的问题,但我今天早上脑子不灵了!基本上我有一个包含内容的框(如内容/一目了然框),我想用一些文本 float 它,就像 float 图像一样。现在,以下 CSS 正在执行此操作:

picture of what's happening

你会如何解决这个问题?

CSS

#content #info_box {
width: 230px;
float: left;
margin-right: 10px;
margin-right: 0;
background: #efefef;
}
#content #info_box #content {
width: 210px;
margin: 7px 10px;
}
#content #info_box #content ul {
list-style-type: none;
padding: 0px;
margin: 3px 0px 10px 0px;
}
#content #info_box #content ul li {
background-image: url(/images/arrow_bullet.png);
background-repeat: no-repeat;
background-position: 0px 5px;
padding-left: 14px;
}
#content #info_box #content #dates { font-size: 14px; }

HTML

    <p>Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed molestie augue sit amet leo consequat posuere. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin vel ante a orci tempus eleifend ut et magna. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus luctus urna sed urna ultricies ac tempor dui sagittis. In condimentum facilisis porta. Sed nec diam eu diam mattis viverra. Nulla fringilla, orci ac euismod semper, magna diam porttitor mauris, quis sollicitudin sapien justo in libero. Vestibulum mollis mauris enim. Morbi euismod magna ac lorem rutrum elementum. Donec viverra auctor lobortis. Pellentesque eu est a nulla placerat dignissim. Morbi a enim in magna semper bibendum. Etiam scelerisque, nunc ac egestas consequat, odio nibh euismod nulla, eget auctor orci nibh vel nisi. Aliquam erat volutpat. Mauris vel neque sit amet nunc gravida congue sed sit amet purus. Quisque lacus quam, egestas ac tincidunt a, lacinia vel velit. Aenean facilisis nulla vitae urna tincidunt congue sed ut dui. Morbi malesuada nulla nec purus convallis consequat. Vivamus id mollis quam. Morbi ac commodo nulla. In condimentum orci id nisl volutpat bibendum. Quisque commodo hendrerit lorem quis egestas. Maecenas quis tortor arcu.</p>
<div id="info_box">
<div id="content">
<b>Job at a glance</b>
<br>
<ul>
<li>This job is an internship</li>
<li>It pays $7 per hour</li>
<li>You'll be working 3 hour shifts</li>
</ul>
You'll be scheduled to work on:<br>
<span id="dates">S <b>M</b> <b>T</b> <b>W</b> <b>T</b> <b>F</b> S</span>
</div>
</div>

最佳答案

这就是你想要的:

http://jsfiddle.net/Mutant_Tractor/qfzJ2/1/

你在所有类(class)开始时都有一个额外的#content

关于html - 文本和图像中的 float 内容框 [css],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5313964/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com