width

width
CSS width Property
The CSS width property is used to specify the width that some elements can receive. This only works on elements that are "block" display type content boxes. For instance if you try to set the width on a <span> element by default it will not adhere to your width property, but if you try to set width for a <div> element or paragraph element it will adhere to the width property.
CSS CODE EXAMPLE
<style type="text/css">
#div1 { width: 400px; }
#div2 { width: 50%; }
#div3 { width: auto; }
.divClass { height:50px; background: #C1E0FF; border:#09F 1px solid; }
</style>
<div id="div1" class="divClass">div content ...</div>
<div id="div2" class="divClass">div content ...</div>
<div id="div3" class="divClass">div content ...</div>
 
div content ...
div content ...
div content ...

Possible Values:

pixel width •• percentage •• auto

0 Response to "width"

Post a Comment