CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 16th, 2004, 12:19 AM
ahuja_neeraj ahuja_neeraj is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: India
Posts: 20 ahuja_neeraj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 54 sec
Reputation Power: 0
problem with the ID selector in CSS

Hello friends

How can i define a css rule with an ID selector for two or more different ID's for an <div> element

thanks

Reply With Quote
  #2  
Old March 16th, 2004, 12:33 AM
cliffhanger9's Avatar
cliffhanger9 cliffhanger9 is offline
fortin bra?
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: city of sin, state of the art
Posts: 416 cliffhanger9 Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 18 h 22 m 19 sec
Reputation Power: 0
Send a message via ICQ to cliffhanger9 Send a message via AIM to cliffhanger9 Send a message via MSN to cliffhanger9 Send a message via Yahoo to cliffhanger9
for IDs use the #class1 instead of the .class1

__________________
"I hate quotations."
-ralph waldo emerson-

Reply With Quote
  #3  
Old March 16th, 2004, 12:40 AM
ahuja_neeraj ahuja_neeraj is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: India
Posts: 20 ahuja_neeraj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 54 sec
Reputation Power: 0
Thanks a lot

Quote:
Originally Posted by cliffhanger9
for IDs use the #class1 instead of the .class1



Hi cliff

thanks a lot for ur reply. I know how to define an id selector css rule But my problem is that a want to define a single rule for various ids

for example

<div id="a">
.....some html
</div>
<div id="b">
.....some html
</div>
<div id="c">
.....some html
</div>

Now i want to define a common css rule for all the above <div> element ids i.e. a,b and c

thanks

Reply With Quote
  #4  
Old March 16th, 2004, 12:50 AM
cliffhanger9's Avatar
cliffhanger9 cliffhanger9 is offline
fortin bra?
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: city of sin, state of the art
Posts: 416 cliffhanger9 Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 18 h 22 m 19 sec
Reputation Power: 0
Send a message via ICQ to cliffhanger9 Send a message via AIM to cliffhanger9 Send a message via MSN to cliffhanger9 Send a message via Yahoo to cliffhanger9
oh okay

sorry about that

try something like this...using commas..

Code:
#a, #b, #c {
 background-color:red;
}


that should apply the red background color to each element where id is either a, b, or c

is that what you meant?

hope this helps!


Reply With Quote
  #5  
Old March 16th, 2004, 12:59 AM
ahuja_neeraj ahuja_neeraj is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: India
Posts: 20 ahuja_neeraj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 m 54 sec
Reputation Power: 0
A Big thakhs

Quote:
Originally Posted by cliffhanger9
oh okay

sorry about that

try something like this...using commas..

Code:
#a, #b, #c {
 background-color:red;
}


that should apply the red background color to each element where id is either a, b, or c

is that what you meant?

hope this helps!



Thanks It Works!!!!!!!!!!!!!!!
Cheers for cliff

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > problem with the ID selector in CSS


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway