Overriding css

Hi Guys,

im having trouble figuring this out

im using wordpress and a plugin for forms

the plugin calls in its own css

but i want to use my own css and i cant edit the stylesheet already being used as this is also being used across other websites on the same installation of WP

i know how to target ids but is there another way of overiding the css as i dont want to do this for every element in a form

also for things like <label> they do not have an id or class assigned to it and i cant seem to over ride them?

help is appreciated :injured:

wow such an easy solution in the end, i just did as you said about putting it right before the head tag closes and it has overridden the plugin style :smiley:

i googled this all day yesterday and didnt find a solution :shifty:

thank you so much :smiley:

If I understand your conundrum correctly, you cant go back an alter the CSS file, save as, and then have the plug in call altered file?

Writting CSS ‘inline’ seems to be what you are suggesting. This means writing it withing the HTLM tags as such <label style=“css declarations go here”>.

I am not certain of your WP config but I would suggest the following two experiments:

1 ) Try hard coding a <LINK> to your own stylesheet, in the HEADER template page for your form… Make sure the link is the LAST tag before you close the </HEAD>. Since it’s the last style sheet imported it will override all previous written rules , except those written “inline” ; I am assuming this plug in isn’t so bold as to write it’s on CSS inline.

  1. IF that doesnt work or if the forms templates are shared across the installation ( in which case you couldnt even write your CSS inline anyways, as that would alter said templates ). I would use a lil PHP slight of hand. It’s simple but it is a a BAND AID method.

You will need to know the name of your site, or some specific info in the DB that is unique to your site. for the sake of example i will use get_bloginfo (‘name’) to get your site name. RIGHT BEFORE the </head> tag, add this:

if ( get_bloginfo (‘name’)==“your site name”) {echo "
<LINK REL=StyleSheet HREF=‘path/youtstyle.css’ >

essentially, this if statement will check the blog/site name, if it’s " your site name" it will add the link to your custom styles.

hope that hepls

glad to have helped. ==:)