Welcome to WebmasterWorld Guest from 54.163.164.67

Forum Moderators: not2easy

Message Too Old, No Replies

Killing Unique IDs Globally with CSS

Form programmers generate IDs. I want to kill them, the IDs, that is...

     
4:50 pm on Mar 29, 2011 (gmt 0)

Junior Member

10+ Year Member

joined:July 1, 2006
posts: 93
votes: 0


I work on a site that generates unique IDs for a given form element every time I build a new form.

For example, there are these date pickers inside a cell inside a row with the IDs tr_range123 or tr_range456, etc.

I want to kill these date pickers but the only way to do it is apply display:none; to these IDs ... Is there any way to apply styles to all these IDs -- past, present and future?

Like...

#tr_range* {display:none;}


Is there something like that out there? I've heard of CSS variables but I think it's different. Also, I need something that's pretty browser-friendly.
1:21 am on Mar 30, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 0


Do they also have a class, or are contained by something else regularly? You probably already thought of that . . .
1:49 am on Mar 30, 2011 (gmt 0)

Junior Member

10+ Year Member

joined:July 1, 2006
posts: 93
votes: 0


Unfortunately, no classes and no other inheritance options without breaking stuff, most likely. Thanks, though. I guess that's a 'no' on wildcards.
11:01 am on Mar 30, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Aug 9, 2008
posts: 961
votes: 0


Hi mrjohncory, what browser versions are you supporting? If not ie6, then the css3 substring attribute selector should do it.
Something like tr[id^=tr_range]
9:49 pm on Apr 1, 2011 (gmt 0)

Junior Member

10+ Year Member

joined:July 1, 2006
posts: 93
votes: 0


Wow, that is exactly what I was hoping for and scary powerful. Thanks!
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members