Is margin possible for a <div> in css?
Is it possible to define a margin for a text area?
my wysiwyg editor places my text within <div>
tags in stead of giving linebreaks <br />
So i thought giving the <div>
a margin?
Is this possible in css? and if yes how?
Many thanks.
EDIT: I can't define the divs because it gets no classes. For example the editor makes it:
<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum egestas lacus libero, et pellentesque nisl. Cras pharetra nunc sit amet urna vestibulum non ultricies metus malesuada. </div>
<div>Nulla tincidunt, neque at blandit ultrices, massa odio pulvinar est, vel accumsan sapien justo sit amet lorem.</div>
您可以通过书写来更改容器中所有<div>
的边距
.MyContainer div {
margin: 42px;
}
like:
div.myDiv{
margin: 10px 0px 5px 20px;
}
gives you: 10 pixel margin at top, 0 pixel margin to right, 5 pixel margin at bottom and 20 pixel margin to left.
<div style="margin:5px;">content</div>
...会在div上放置一个5像素的边距。
链接地址: http://www.djcxy.com/p/88332.html上一篇: 基于Twitter Bootstrap的响应式设计中的流体或固定网格系统
下一篇: css中的<div>边缘可能吗?