tags:

views:

55

answers:

3

In other words, the HTML blurb below has "little words" in the upper right and I want it to be in the lower right.

<html>
  <body>
    <div style="width: 500px; background-color: #cdcdcd">
      <div style="font-size: x-small; float: right">little words</div>
      <div style="font-size: x-large">BIG WORDS</div>
    </div>
  </body>
</html>
+1  A: 

Don´t know if you can do that reliably (most browsers...) using a right float.

You could try it with absolute positioning:

<html>
  <body>
    <div style="width: 500px; background-color: #cdcdcd; position: relative;">
      <div style="font-size: x-small; postition: absolute; bottom: 0; right: 0">little words</div>
      <div style="font-size: x-large">BIG WORDS</div>
    </div>
  </body>
</html>
jeroen
A: 

If you want floats, change the order of the divs, and apply a clearfix class to the containing div.

  <html>
    <body>
      <style type="text/css">
        .clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
        .clearfix { display: inline-block; }
        /* Opera hack \*/
        * html .clearfix { height:1%; }
        .clearfix { display:block; }
      </style>
      <div style="width: 500px; background-color: #cdcdcd" class="clearfix">
        <div style="font-size: x-large">BIG WORDS</div>
        <div style="font-size: x-small; float: right">little words</div>
      </div>
    </body>
  </html>
hgimenez
A: 
Pedro Ladaria