Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old September 6th, 2008, 03:02 PM
Newbie
 
Join Date: Aug 2008
Posts: 22
Default selector for textfield?

since it's not an element but an attribute, how do I write a style for all textfields that are in a listitem in an unordered list?

ul li input ?? {

}
Reply
  #2  
Old September 6th, 2008, 06:08 PM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 12,727
Default

Expand|Select|Wrap|Line Numbers
  1. input[type="text"] {
works in most browsers. Unfortunately not in IE6 though, so you'd have to use classes to make it work in all browsers.
Reply
  #3  
Old September 6th, 2008, 06:48 PM
Newbie
 
Join Date: Aug 2008
Posts: 22
Default

thanks, that approach makes perfect sense. But I suppose that's why it doesn't work in IE7, either.

Oh, how much better the world of software would have been if Bill Gates had never been born.
Reply
  #4  
Old September 7th, 2008, 01:11 PM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 12,727
Default

Attribute selectors do work in IE7, but not with complete support. You may need to use a strict doctype to get it to begin behaving anything like you'd want it to.
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles