我试图将一些元素放在div中。
Bootstrap fiddle(点击红色图标后)
您可能会在Bootply链接中看到我尝试过的一些内容。通常在这种情况下,我会将图像和文本元素拆分为单独的Div并尝试将它们设置为display:inline-block
。
这似乎不起作用,可能是因为我使用了bootstrap,它有一些适用于所有Div的默认样式。或者它可能无法正常工作,因为我是CSS中的业余爱好者。
答案 0 :(得分:2)
您可以查看我的解决方案Bootstrap fiddle
刚从Bootstrap的Image中添加了左侧的类,并从.notification_msg更改了css。
<img class="notification_img pull-left" src="http://placehold.it/60x60">
.notification_msg {
padding-bottom: 30px;
border-bottom: 1px solid #D3D3D3;
}
。