Results 1 to 6 of 6

Thread: [Resolved] Proper way to CSS align a form

  1. #1

    Thread Starter
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Arrow [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
    Last edited by penagate; Jun 9th, 2005 at 12:50 PM.

  2. #2
    Fanatic Member ALL's Avatar
    Join Date
    Jul 2004
    Location
    192.168.1.1
    Posts
    711

    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>
    Please support one of my projects?
    TKForums.com

    Web Forum
    JavaScript Wiki
    ________________________
    If somone helps you, please rate their post, by clicking the to rate their post

  3. #3

    Thread Starter
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Proper way to CSS align a form

    Thanks! I should have thought of that

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

  4. #4
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: Proper way to CSS align a form

    Quote Originally Posted by penagate
    Thanks! I should have thought of that

    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
    My Blog.

    Ryan Jones.

  5. #5

    Thread Starter
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    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?

  6. #6
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    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
    My Blog.

    Ryan Jones.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width