positioning inside a div

T

Tarscher

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
 
B

Beauregard T. Shagnasty

Tarscher said:
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?
 
N

Nik Coughlin

Tarscher said:
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.
 
T

Tarscher

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top