PDA

Click to See Complete Forum and Search --> : [Resolved] Proper way to CSS align a form


penagate
Jun 9th, 2005, 08:46 AM
N00b question...
How do I use CSS to align a form to the right, when its vertical postion is absolute?

At the moment I have this
<span style="position:absolute;top:335px;horizontal-align:right; margin-right: 20px;">
<form method="get" action="http://www.google.com/search" target="_blank">
<!-- ... -->
</form></span>

It was working once, but now it isn't :(

ALL
Jun 9th, 2005, 10:13 AM
<body>
<span style="position:absolute;top:335px;margin-right: 20px;right:0">
<form method="get" action="http://www.google.com/search" target="_blank">
</form></span>
</body>

penagate
Jun 9th, 2005, 10:19 AM
Thanks! :) I should have thought of that :rolleyes:

So what's the difference between margin-right and right? They seem to give me the same results.

sciguyryan
Jun 9th, 2005, 12:23 PM
Thanks! :) I should have thought of that :rolleyes:

So what's the difference between margin-right and right? They seem to give me the same results.

Margin-right sets the right margin of an element and right sets how far the right edge of an element is to the left/right of the right edge of the parent element :)

Cheers,

RyanJ

penagate
Jun 9th, 2005, 12:27 PM
Margin-right sets the right margin of an element and right sets how far the right edge of an element is to the left/right of the right edge of the parent element :)

Cheers,

RyanJ
So I guess in this case (since my form is directly on the body) they mean exactly the same thing, correct?

sciguyryan
Jun 9th, 2005, 03:24 PM
So I guess in this case (since my form is directly on the body) they mean exactly the same thing, correct?


In this context yes it does :)

Cheers,

RyanJ