Old 05-07-2009, 17:46   #1 (permalink)
jashsayani
Registered User
 
jashsayani's Avatar
 
Join Date: May 2009
Posts: 39
Basic HTML/CSS help.

Hi,

I am trying to make a small login screen with HTML and CSS. I am using an image as login box (with img src - center). Now I used div username for username label and textfield, and div password for password label and textfield. I also used CSS file to position both fields.

However, when I re-size the browser window, the login box picture adjusts to the center of window, but the textfields don't move and everything is out of place.

How do I keep the username and passwords inside the login box pic (no matter if window is re-sized) ?

Some help would be great. Thanks.
  Reply With Quote
Old 05-07-2009, 17:49   #2 (permalink)
Webstar
Senior Member
 
Join Date: Feb 2006
Posts: 3,596
why don't you just make a div and use the login box image as the background and then put the login fields inside that div?
  Reply With Quote
Old 05-07-2009, 19:29   #3 (permalink)
Shiro
Whitey
 
Shiro's Avatar
 
Join Date: Aug 2007
Location: Yokohama, Japan
Posts: 7,320
I'm guessing you used absolute positioning. Don't. That is what is causing your problem.
__________________
This space for rent.

After Hours Japan
  Reply With Quote
Old 05-07-2009, 20:59   #4 (permalink)
DKuntz2
That Kid
 
DKuntz2's Avatar
 
Join Date: Apr 2009
Posts: 1,370
Login box with html? don't you mean php?
  Reply With Quote
Old 05-07-2009, 21:04   #5 (permalink)
Webstar
Senior Member
 
Join Date: Feb 2006
Posts: 3,596
He's talking about the form...
  Reply With Quote
Old 05-07-2009, 21:16   #6 (permalink)
bazzle
Don't touch my tea!
 
bazzle's Avatar
 
Join Date: Aug 2007
Posts: 1,723
Send a message via MSN to bazzle
Quote:
Originally Posted by Shiro
I'm guessing you used absolute positioning. Don't. That is what is causing your problem.


Why?

People keep going on about absolute positioning as if it's the devil or something.

It's a perfectly acceptable method of positioning elements if you know how to use it properly.
__________________
  Reply With Quote
Old 05-07-2009, 21:34   #7 (permalink)
Shiro
Whitey
 
Shiro's Avatar
 
Join Date: Aug 2007
Location: Yokohama, Japan
Posts: 7,320
I agree fully. But someone who is having troubles with it is using it improperly. And by the time they figure out that what I said is not absolute, they will probably know when to use it, and when not to.
__________________
This space for rent.

After Hours Japan
  Reply With Quote
Old 05-07-2009, 21:36   #8 (permalink)
Webstar
Senior Member
 
Join Date: Feb 2006
Posts: 3,596
Quote:
Originally Posted by Shiro
I agree fully. But someone who is having troubles with it is using it improperly. And by the time they figure out that what I said is not absolute, they will probably know when to use it, and when not to.

nice
  Reply With Quote
Old 06-07-2009, 06:04   #9 (permalink)
jashsayani
Registered User
 
jashsayani's Avatar
 
Join Date: May 2009
Posts: 39
Quote:
Originally Posted by Webstar
why don't you just make a div and use the login box image as the background and then put the login fields inside that div?

Thanks! That solves my problem.
  Reply With Quote
Old 06-07-2009, 08:42   #10 (permalink)
Shiro
Whitey
 
Shiro's Avatar
 
Join Date: Aug 2007
Location: Yokohama, Japan
Posts: 7,320
Quote:
nice



I didn't notice that.
__________________
This space for rent.

After Hours Japan
  Reply With Quote
Old 07-07-2009, 04:39   #11 (permalink)
kanthcoolguy
Registered User
 
Join Date: Jul 2009
Posts: 3
visit (3schools) site for html assistance
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive
Web Hosting by Heart Internet, vBulletin © 2000-2009 Jelsoft Enterprises Limited.
Search Engine Optimization by vBSEO 3.0.0 RC8
Web Hosting by Heart Internet