0

I have multiple css styles:

form#reply_form-c1r1.odgovor div#cmtforms-c1r1 input{color:red}
form#reply_form-c2r1.odgovor div#cmtforms-c2r1 input{color:red}
form#reply_form-c3r1.odgovor div#cmtforms-c3r1 input{color:red}
form#reply_form-c4r1.odgovor div#cmtforms-c4r1 input{color:red}

and I want to make the one css style like this

form[id^="reply_form-c"]r1.odgovor div[id^="cmtforms-c"]r1 input{color:red}

But this code, doesn't work..

What I missed?

Aleksandar
  • 501
  • 3
  • 10
  • 21

1 Answers1

0

Just give the elements a class and use that not all the id's etc. class="red-block" and then in CSS .red-block{color:red;}

Example:

.red-block {
  color: red;
}
<div class="red-block">Howdy</div>
<span class="red-block">spanner</span>
<button type="button" class="red-block">Make me do it</button.
Mark Schultheiss
  • 32,614
  • 12
  • 69
  • 100