The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS regarding clear:both;

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #27004

    <div id="container">
    <div style="float:left;width:200px; height:100px;">firstdiv</div>
    <div style="float:left;width:200px; height:100px;">secondiv</div>
    <div style="clear:both;">This div is used to clear the float propery</div>
    In a container div i used two divs to hold some imgs. for displaying parllely i used float propery. i used third div to clear the float property. is it the right way to clear the float by using one more div or is there any option to clear the property with out using extradiv


    you could, if you have one, use the footer to clear the float.

    Or use the clear:after fix on the second div. (google it)

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.