0

I think this one is simple. I've checked Google but could not find the exact answer so I thought maybe someone here could help.

I have a Div that I would like to float 3 other elements in.

So let's say

<style type="text/css">
.alignleft {
float: left;
}
.alignright {
float: right;
}
</style>

<div id=main>
  <div id=left-float  class='alignleft'>
     <p>Left Text</p>
  </div>
  <div id=right-top class='alignright'>
     <p>Top right Text</p>
   </div>
</br>
   <div id=right-bottom class='alignright'>
      <p>Bottom right Text</p>
   </div>
</div>

So what I would like to have happen is have the left-float div on the left and then the other two divs stacked directly on top of each other. The way it is now is the right-bottom div is below but to the left of the right-top div.

Any help would be great!
Thank you.

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by agr8lemon
0

Hi.
Try this for your align right

.alignright {
float: right;
clear:both;
}

Perfect! Thank you so much.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.