almightyegg Posted February 10, 2007 Share Posted February 10, 2007 i have a form: <form method="POST" action="welcome.php"> <b>Name:</b><br /> <input type="text" id="1" name="name" /><br /> <b>Email:</b><br /> <input type="text" id="1" name="email" /><br /> <input type="submit" value="Login"> </form> and css to deal with it: #1 { border:solid 0 #fff; margin:3px; height:20px; width:200px; background: transparent url("images/textfield_bg.gif") no-repeat; } INPUT { border:solid 0 #fff; margin:3px; height:20px; width:80px; background: transparent url("images/textfield_bg2.gif") no-repeat; } In IE it works fine but in FF it shows images/textfield_bg2.gif for all inputs...even though i said 'id="1"' in the text inputs! How do I solve this? If you want to know more about what's wrong click here Link to comment https://forums.phpfreaks.com/topic/37893-input-customization/ Share on other sites More sharing options...
ToonMariner Posted February 10, 2007 Share Posted February 10, 2007 id must be unique for any element on a page - once it has been used it can't be used again. If you are using this to style the input then alter it to a class. Link to comment https://forums.phpfreaks.com/topic/37893-input-customization/#findComment-181414 Share on other sites More sharing options...
almightyegg Posted February 10, 2007 Author Share Posted February 10, 2007 right I've done that but it still doesn't work in firefox html <form method="POST" action="welcome.php"> <b>Name:</b><br /> <input class="1" type="text" name="name" /><br /> <b>Email:</b><br /> <input class="1" type="text" name="email" /><br /> <input class="2" type="submit" value="Login"> </form> css .1 { border:solid 0px #fff; margin:3px; height:20px; width:200px; background: transparent url("images/textfield_bg.gif") no-repeat; } .2 { border:solid 0px #fff; margin:3px; height:20px; width:80px; background: transparent url("images/textfield_bg2.gif") no-repeat; } Link to comment https://forums.phpfreaks.com/topic/37893-input-customization/#findComment-181421 Share on other sites More sharing options...
miligraf Posted February 10, 2007 Share Posted February 10, 2007 Im not an expert in CSS but i would rather use "first" and "second" instead of the numbers, try that and see if it works and if it doesnt try cleaning FireFox history (Control + Shift + Delete). Link to comment https://forums.phpfreaks.com/topic/37893-input-customization/#findComment-181455 Share on other sites More sharing options...
almightyegg Posted February 10, 2007 Author Share Posted February 10, 2007 thanks! Yes it worked. I won't use numbers in then future. Link to comment https://forums.phpfreaks.com/topic/37893-input-customization/#findComment-181475 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.