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

Related Posts :

  • max-width max-width CSS max-width Property The CSS max-width property is used to specify t… Read More...
  • min-height min-height CSS min-height Property The CSS min-height property is used to specif… Read More...
  • empty-cells empty-cells CSS empty-cells Property The CSS empty-cells property is used to spe… Read More...
  • max-height max-height CSS max-height Property The CSS max-height property is used to set th… Read More...
  • left left CSS left Property The CSS left property is used to offset an element's left… Read More...

0 Response to "width"

Post a Comment