Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > positioning inside a div

Reply
Thread Tools

positioning inside a div

 
 
Tarscher
Guest
Posts: n/a
 
      12-17-2007
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

 
Reply With Quote
 
 
 
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      12-17-2007
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
 
Reply With Quote
 
 
 
 
Nik Coughlin
Guest
Posts: n/a
 
      12-17-2007

"Tarscher" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.

 
Reply With Quote
 
Tarscher
Guest
Posts: n/a
 
      12-18-2007
On 17 dec, 23:12, "Nik Coughlin" <(E-Mail Removed)> wrote:
> "Tarscher" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed)...
>
>
>
> > 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
drag div from inside div to inside another 123Jim Javascript 0 05-16-2011 08:36 AM
<div ... /> and <div ...></div> K Viltersten ASP .Net 4 03-31-2009 07:33 PM
What's with it anyway? Div inside a div greenflame HTML 4 08-13-2007 11:46 PM
NS/FF don't change div offsetWidth when div innerHTML is added toand div becomes wider mscir Javascript 3 06-26-2005 04:04 PM
Q: Div A inside Div B is larger than Div B Dwayne Madsen Javascript 1 06-01-2005 03:02 PM



Advertisments