Search code examples
htmlpositioning

DIV Layout and positioning


I'm struggling to position a input button and then form field to the right of a DIV.

You can see the basic layout here : http://jsfiddle.net/qk0jp5pt/

body { background-color:#C0C0C0; }
#page { width: 80%; margin: 30px auto; padding: 0; border: 1px solid #800000 }   
#row { width: 80%; border: 1px solid #FF0000; }                                                                                                                                                                   
#table { width: 80%; border: 1px solid #00FF00 }

The #row is the div I'm trying to align. It's border is red and I'd like to move the input button the right inside of that DIV.

Ultimately I'd like to add an input text field and have them both aligned to the right with in #row. http://jsfiddle.net/qk0jp5pt/1/

Can someone advise what I'm doing wrong !

Thanks


Solution

  • Adding:

    text-align: right;

    to #row does the trick

    http://jsfiddle.net/qk0jp5pt/2/