Jump to content

CSS form element


yumasan

Recommended Posts

Trying to style only a single element in a form that is named "currency_code".

I can't seem to figure out the correct coding.

There are 2 elements in the form that are controlled by a #text, I want to style the one named currency_code differently.

Suggestions?

 

Please see attached image. 

currencycodecss.png

Link to comment
Share on other sites

Well, the two things you've got for standard styling is to add an ID to that element, or add a class to it. Then use CSS selectors that match (`#ID` or `.class`)

Link to comment
Share on other sites

Oh that changes things, there are general attribute selectors. They work well enough, its just better to use the id or class. Here's where you can read up on those attribute selectors: https://www.w3schools.com/css/css_attribute_selectors.asp

Edited by Funce
Link to comment
Share on other sites

That is text on its own, as it suggests with #text, input are void elements they dont hold content so using that attribute name is useless, only the form element is a content container try using that as a reference, it will change both together though, not separately.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...