html - CSS/Bootstrap div 布局问题

标签 html css twitter-bootstrap

我试图在一个 div 中定位一些元素。

Bootstrap fiddle (点击红色图标后)

Desired end result

您可能会在 Bootply 链接中看到我尝试过的一些事情。通常对于这种情况,我会将图像和文本元素拆分为单独的 Div,并尝试将它们设置为 display:inline-block

这似乎不起作用,可能是因为我使用的是 Bootstrap ,它有一些适用于所有 Div 的默认样式。或者它可能不起作用,因为我是 CSS 的业余爱好者。

最佳答案

你可以查看我的解决方案Bootstrap fiddle

刚刚通过 Bootstrap 中的图像添加了 pull-left 类,并从 .notification_msg 更改了 css。

<img class="notification_img pull-left" src="http://placehold.it/60x60">

.notification_msg { 填充底部:30px; border-bottom: 1px solid #D3D3D3;

关于html - CSS/Bootstrap div 布局问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23736701/

相关文章:

html - 使用 CSS 使一条线穿过图像

twitter-bootstrap - 如何将图像设置在另一个图像之上?

javascript - JQuery 菜单触发内容

css - 使用CSS在浏览器中输出换行符

html - 在调整大小时保持固定的 div 对齐

jquery - 检查页面上是否有特定的字形图标,如果有,请更改为其他字形

javascript - 在 jquery bootstrap 数据表中显示 NaN 到 NaN

html - 相对于同级垂直对齐 div

javascript - 没有滚动条的水平菜单滚动

php - 复选框重复