[Resolved] Proper way to CSS align a form
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
HTML Code:
<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 :(
Re: Proper way to CSS align a form
HTML Code:
<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>
Re: Proper way to CSS align a form
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.
Re: Proper way to CSS align a form
Quote:
Originally Posted by penagate
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
Re: Proper way to CSS align a form
Quote:
Originally Posted by sciguyryan
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?
Re: Proper way to CSS align a form
Quote:
Originally Posted by penagate
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