Page 1 of 1

NMS Form Button

Posted: Mon May 07, 2007 2:06 pm
by asim
Hi,

I'm having great difficulty with something that should be very straight forward and it seems a waste that I should be posting  :( but I'm left with no other option...

I want to style the button of my NWS form submit button, but I can't as it does not have pre-assigned "class" to it and I do not know how to attach a class, or does anyone know of any other method. FYI, my site does use the same "submit" style for all forms.

Here is the site: http://www.jenniemarshtrust.org

Thanks

Re: NMS Form Button

Posted: Mon May 07, 2007 7:03 pm
by skypanther
Looking at the code of your newsletter page, the form has the id m4moduleform_2 and the submit button has no id or class. So, you can use the following in your stylesheet.

#m4moduleform_2 input { style_rules_here }

Make sure to check that page if you add new modules or move pages around. I suppose that form ID could change, which would prevent the style selector from matching.

Tim

Re: NMS Form Button

Posted: Mon May 07, 2007 7:15 pm
by calguy1000
the standard way to style these things is to embed the module tag inside of a div... and then style everything within that div.

so i'd do something like {cms_module module='NMS ...}
then a

#nms_form input { style rules here }

Re: NMS Form Button

Posted: Mon May 07, 2007 8:06 pm
by asim
Hi,

Thank you for your replies. However I should have mentioned this in my original email (sorry); I tried both of your methods however styling just the “input” tag results in ALL “input” tags to be styled the same, i.e Text and Textarea fields look like the “submit” button. Does that make sense? How do I resolve this?

Thank you

Re: NMS Form Button

Posted: Mon May 07, 2007 8:10 pm
by calguy1000
a simple google search turned up that input.submit should do the trick

Re: NMS Form Button

Posted: Mon May 07, 2007 9:11 pm
by asim
Hi,

Your not going to believe this I have done exactly as you mentioned and it still does not work! ???

Here is my CSS:

Code: Select all

input.submit{
font: 14px "trebuchet ms";
font-weight:bold;
width:4.5em;
height:22px;
line-height:16px;
background:#C8C7C7 url(xxx/deleted.gif) repeat-x 0 100%;
border:none;
cursor:pointer;
color:#A3A3A3;
padding:0;
}
Any ideas?