Hi!

I have a small custom user login form at the header of my web site. The default styling for the wrapper div's on form elements was causing my mini-login form to not display as I required (inline). So I added the following to my .css to fix this:

#edit-pass-1-wrapper, #edit-name-1-wrapper {
	float:left;
	margin:0;
}

This fixed the layout fine. If i goto /user/login, both the header login form and the main login form content is displayed (this is how I want it). The header login form keeps it's wrapper div names as before and the main login form usees #edit-pass-wrapper, #edit-name-wrapper; there is no ID clashes.

However, if I enter an INCORRECT username/password - the user/login page is displayed with a red error border around both the mini header login form field and the main login form field. Because there is an error, drupal somehow names both the header-login form wrappers the SAME..

both become #edit-pass-wrapper and #edit-name-wrapper

Therefore the main login form field wrappers are being styled but I don't want them to be! How can I give the header login form field wrappers unique ID's to avoid this happening?

Comments

fenda’s picture

If anyone is able to help with this, i'd appreciate it!

A good programmer is a lazy programmer.