Elena Vesvina
Elena Vesvina

Reputation: 71

How can I change the color of this text?

This is the site:

http://avocat.dac-proiect.ro/wp/?page_id=19

I have a contact form and the text color is black

I want to change the color and used the CSS code but unfortunately this does not work ...

.contactform11 .wdform-label{color:white;}

How can I solve this problem?

Thanks in advance!

Upvotes: 0

Views: 75

Answers (6)

Dee
Dee

Reputation: 714

Try this

.contactform11
.wdform-label {
    #000;
}

Upvotes: 0

Jekrb
Jekrb

Reputation: 454

There is an !important, first get rid of that.

.contactform11 .wdform-label {
  color: #B7B6C3 !important;
}

Then in the code block here replace #000, with #fff:

.contactform11 .wdform-label {
  border: none;
  color: #000; /* should be #fff */
  vertical-align: top;
  line-height: 17px;
}

If you can't access the css file for some reason, it's a very simple change with js.

You can use something like

[].forEach.call(document.querySelector('.contactform11 .wdform-label'), 
function(el) { el.style.color = '#fff' } )

There is a small npm module to abstract this further. (Don't have to constantly rewrite .call and document.querySelector over and over... )

var forEachEl = require('for-each-el')

forEachEl('.contactform11 .wdform-label', 
function(el) { el.style.color = '#fff' })

Upvotes: 1

FevtheDev
FevtheDev

Reputation: 157

Remove the space between .contactform11 and .wdform-label. So:

.contactform11.wdform-label{ color: #FFF; }

Upvotes: 0

GolezTrol
GolezTrol

Reputation: 116100

There is a style .contactform11 .wdform-label (same selector, just as specific), specified in the page itself (around line 900). This style selector will override the one you added to the style sheet.

Upvotes: 1

FevtheDev
FevtheDev

Reputation: 157

Go on and use the element instead maybe? Then assign in an id of 'contactform11' and use the css selector to set the label colors to whatever you desire (White in this case) See below:

<form id="contactform11"><label>Name</label></form>

CSS:

#contactform11 label {
 color: #FFF;
}

Should do the trick!

Upvotes: 0

Maybe is because the order in wich the css rules are aplied. Try using:

.contactform11 .wdform-     label{color:white !important;}

Upvotes: 0

Related Questions