yumasan Posted October 14, 2020 Share Posted October 14, 2020 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. Link to comment Share on other sites More sharing options...
Funce Posted October 14, 2020 Share Posted October 14, 2020 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 More sharing options...
yumasan Posted October 14, 2020 Author Share Posted October 14, 2020 Thank you, however this form is auto generated from a module in Joomla!. Is there anther way to style it without giving it one of those? Is there a way to style it based on the "name"? Thanks again. Link to comment Share on other sites More sharing options...
Funce Posted October 14, 2020 Share Posted October 14, 2020 (edited) 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 October 14, 2020 by Funce Link to comment Share on other sites More sharing options...
dsonesuk Posted October 15, 2020 Share Posted October 15, 2020 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 More sharing options...
yumasan Posted October 15, 2020 Author Share Posted October 15, 2020 Thank you both! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now