Forums

CSS for Input label

nja 08 Apr, 2014
Hi,
I have gotten the CSS to work for my form's inputs and for required labels, using the "Load CSS" action in the form onload event. And I can get it to work for input fields. But it doesn't work for the just labels.

input.cf_staff_fax{
border-left: 6px solid blue;
}

label.staff_fax {
color: blue;
}

Can you help me out with my css syntax?

thanks
Max_admin 09 Apr, 2014
Hi nja,

Try to add "!important" ? maybe there is another more specific rule!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 09 Apr, 2014
Hi nja,

Please post a link to the form so I can take a quick look.

Bob
nja 09 Apr, 2014
Hi, Sorry, form is for a company intranet and behind AD login. I could send you the form backup file, would that help?

thanks
GreyHead 09 Apr, 2014
Hi nja,

Probably not - usually CSS problems are an interaction with CSS from the template, or from some other element on the page. Your browser web developer tools will let you see exactly what is being applied.

Bib
nja 09 Apr, 2014
Hi,
Chrome tools says the CSS path is, "#staff_fax_container_div > label"

I have tried to add the div name to the css a couple of times, but obviously my snytax is not correct.

thanks,
nancy
nja 09 Apr, 2014
Hi,
Got it! Not sure if the !important is absolutely necessary, but I am leaving it in since it is working.

input.cf_staff_fax{
border-left: 6px solid blue;
}

#staff_fax_container_div label {
color: blue !important;
}

I am pretty sure I tried this before, but the devil is in the details. Thanks for being a sounding board.

thanks!
This topic is locked and no more replies can be posted.