Reputation: 403
I install popeye to slider images. When I must to create another slider show I duplicate all the css content to another id for example this
#ppy1 .ppy-extcaption {
width: 240px;
display: block;
}
#ppy4 .ppy-extcaption {
width: 240px;
display: block;
}
#ppy5 .ppy-extcaption {
width: 240px;
display: block;
}
there are any form to create diferents id with same properties with less css code duplicate.
Thank you Sorry my bad english
Upvotes: 0
Views: 51
Reputation: 85653
Use like this:
[id*=ppy] .ppy-extcaption{
width: 240px;
display: block;
}
Update
[attr^=value] Represents an element with an attribute name of attr and whose value is prefixed by "value".
[attr*=value] Represents an element with an attribute name of attr and whose value contains at least one occurrence of string "value" as substring.
Upvotes: 1
Reputation: 103428
#ppy1 .ppy-extcaption,
#ppy4 .ppy-extcaption,
#ppy5 .ppy-extcaption
{
width:240px;
display:block;
}
Or if you're confident class ppy-extcaption
isn't used anywhere else in your application, just reference the class:
.ppy-extcaption
{
width:240px;
display:block;
}
Upvotes: 3
Reputation: 28773
Simply use class
.ppy-extcaption {
width: 240px;
display: block;
}
Or even you can use them like
#ppy1 .ppy-extcaption, #ppy4 .ppy-extcaption, #ppy5 .ppy-extcaption
{
width:240px;
display:block;
}
Upvotes: 3