TheFilmGod Posted January 24, 2008 Share Posted January 24, 2008 Hi, I want to style an input field and leave the submit button alone. #header_search input { width: 150px; background: url(layout/input_bg.png) repeat-x; border: 1px solid #6d6d6d; } #header_search input:hover { border: 1px solid #205bc0; } The problem is that this code affects all input including textfields and submit buttons! How can I tag only textfields using css? Quote Link to comment https://forums.phpfreaks.com/topic/87479-input-field/ Share on other sites More sharing options...
phpQuestioner Posted January 24, 2008 Share Posted January 24, 2008 you can just give each of your textfields the same class and style as needed. using "input" will cover all input types; it's not just limited to textfields. you also could just leave your submit button outside the html element; the one that you have given the id of "header_search" to. Quote Link to comment https://forums.phpfreaks.com/topic/87479-input-field/#findComment-447439 Share on other sites More sharing options...
TheFilmGod Posted January 24, 2008 Author Share Posted January 24, 2008 Thanks! - But that wasn't what I was looking for. I wanted to use css to do this=> .class input[type=text] { } Is the way to do it. This just isn't supported well among browsers, so I'll just use classes... :-\ Quote Link to comment https://forums.phpfreaks.com/topic/87479-input-field/#findComment-448039 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.