Jump to content

input style not working when adding name


xwishmasterx

Recommended Posts

Hello

 

I have a very wierd problem. Below code is a simple login form:


<form action="verify.php" method="post">
    User Name:<br>
    <input type="text" class="login" name="" ><br><br>
    Password:<br>
    <input type="password" class="login" name="password"><br><br>
    <div align="center"><input type="submit" name="submit" value="Login"></div>
</form>

The above code works fine, but if I add any value to the name attribute in the first input field, the style doesn't work.

(except if I enter "password")

Seems the css for background-image isn't added when entering anyname.

 

Anyone have an idea why this happens?

Already tried that..thanks.

 

It seems it's the background property that isn't working as I can style height, width etc..

 

What puzzles me is that adding something to the name attribute kills the background style.

 

Seems adding any value to the input and css works fine again.

Tried that also.

The really wierd thing is I'm using the style on other forms/inputs without issues and only have one stylesheet.

 

I did a work around for now (adding value=" " - then remving the whitespace on sending)

will mark as solved anyways.

 

thanks for the ideas

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.