|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
for IDs use the #class1 instead of the .class1
![]()
__________________
"I hate quotations." -ralph waldo emerson- |
|
#3
|
|||
|
|||
|
Thanks a lot
Quote:
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 ![]() |
|
#4
|
||||
|
||||
|
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! ![]() |
|
#5
|
|||
|
|||
|
A Big thakhs
Quote:
Thanks It Works!!!!!!!!!!!!!!! Cheers for cliff |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > problem with the ID selector in CSS |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|