I'm trying to style up a form within the Wishlist Member plugin in Wordpress and there isn't a template where I can physically go into and add classes, id's, etc. So I was wondering if there was a way to style up an <input type="submit">
with no class or id without affecting the <input type="text">
fields using javascript maybe. Thanks.
views:
45answers:
2
+3
A:
You can add style with CSS even if there is no class/id. The following selects all input
elements with attribute type="submit"
:
input[type="submit"]{
/* style */
}
The above is very generic, it's better to be more exclusiver. So include some of its parents , preferable those with an ID/class:
div#someID form input[type="submit"]{
/* style */
}
(assuming a parent <div id="someID">
)
Lekensteyn
2010-09-15 15:58:43
In addition, the form will probably have a name or id, so you can add form#id or form[name="name"] in front of that declaration if you want to limit your changes to that particular form.
Jonas Wagner
2010-09-15 16:06:40
I've never heard of Wishlist Member plugin, nor have I seen an example of it. So I cannot confirm whether the form has an ID or not.
Lekensteyn
2010-09-16 10:36:16