positioning inside a div

Discussion in 'HTML' started by Tarscher, Dec 17, 2007.

  1. Tarscher

    Tarscher Guest

    Hi all,

    I have a div containing a h1 element and a login form (here a span). I
    want the loginform to appear on the right bottom corner of the
    div.Since the div is much wider then the h1 the login form (span) will
    not interfere with the h1.

    <div>
    <h1>Testing</h1>
    <span style="...">
    username:
    password:
    </span>
    </div>

    The bottom position of span shouldn't be the same as the bottom
    position of the h1

    Many thanks
    Stijn
     
    Tarscher, Dec 17, 2007
    #1
    1. Advertising

  2. Tarscher wrote:

    > I have a div containing a h1 element and a login form (here a span). I
    > want the loginform ..


    Where is your <form> .. </form> element going to be?

    --
    -bts
    -Friends don't let friends drive Vista
     
    Beauregard T. Shagnasty, Dec 17, 2007
    #2
    1. Advertising

  3. Tarscher

    Nik Coughlin Guest

    "Tarscher" <> wrote in message
    news:...
    > Hi all,
    >
    > I have a div containing a h1 element and a login form (here a span). I
    > want the loginform to appear on the right bottom corner of the
    > div.Since the div is much wider then the h1 the login form (span) will
    > not interfere with the h1.
    >
    > <div>
    > <h1>Testing</h1>
    > <span style="...">
    > username:
    > password:
    > </span>
    > </div>
    >
    > The bottom position of span shouldn't be the same as the bottom
    > position of the h1


    Set the parent that you wish to position within (the div) to position:
    relative; Set the element that you wish to position to position: absolute;
    right: 0; bottom: 0;

    Also: what Shagnasty said. You need a <form> element.
     
    Nik Coughlin, Dec 17, 2007
    #3
  4. Tarscher

    Tarscher Guest

    On 17 dec, 23:12, "Nik Coughlin" <> wrote:
    > "Tarscher" <> wrote in message
    >
    > news:...
    >
    >
    >
    > > Hi all,

    >
    > > I have a div containing a h1 element and a login form (here a span). I
    > > want the loginform to appear on the right bottom corner of the
    > > div.Since the div is much wider then the h1 the login form (span) will
    > > not interfere with the h1.

    >
    > > <div>
    > > <h1>Testing</h1>
    > > <span style="...">
    > > username:
    > > password:
    > > </span>
    > > </div>

    >
    > > The bottom position of span shouldn't be the same as the bottom
    > > position of the h1

    >
    > Set the parent that you wish to position within (the div) to position:
    > relative; Set the element that you wish to position to position: absolute;
    > right: 0; bottom: 0;
    >
    > Also: what Shagnasty said. You need a <form> element.


    Many thanks,

    That solved it.

    PS: The form is wrapped around the username and login
     
    Tarscher, Dec 18, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. greenflame
    Replies:
    4
    Views:
    959
    dorayme
    Aug 14, 2007
  2. K Viltersten

    <div ... /> and <div ...></div>

    K Viltersten, Mar 30, 2009, in forum: ASP .Net
    Replies:
    4
    Views:
    809
  3. Dwayne Madsen

    Q: Div A inside Div B is larger than Div B

    Dwayne Madsen, Jun 1, 2005, in forum: Javascript
    Replies:
    1
    Views:
    236
    David Dorward
    Jun 1, 2005
  4. mscir
    Replies:
    3
    Views:
    359
    Martin Honnen
    Jun 26, 2005
  5. 123Jim
    Replies:
    0
    Views:
    158
    123Jim
    May 16, 2011
Loading...

Share This Page