views:

63

answers:

2

I have one Parent div. Top of the Parent div contains two child divs. How can i give third child div below the first child div

<div class=parent1>
  <div class=child1>some text</div> /*this is in top left of the parent div */
  <div class=child2>some text</div> /*this is in top right of the parent div */
  <div class=child3>some text</div> /*how can i write css for this div come as left bottom*/

A: 
Sarfraz
I think he wants it to be done using HTML and CSS.
rahul
@rahul: It could be so but CSS is easy, one can simply add the class/id and style a particular elememnet but I think he is looking for how to add a child div just before first child div of a parent.
Sarfraz
A: 

Using the css float will work if you are willing to assign a fixed width to your div's.

<style>
  div.parent1 {
    width: 800px;
  }

  .child1 {
    float: left;
    width: 400px;
  }

  .child2 {
    float: right
    width: 400px;
  }

  .child3-container {
    clear:both;
    text-align: right;
  } 

</style>

<div class=parent1>
  <div class=child1>some text</div> 
  <div class=child2>some text</div> 
  <div class='child3-container' >
    <div class=child3>some text</div> 
  </div>
</div>
NixNinja