Forum Moderators: not2easy

Message Too Old, No Replies

Changing appearance of <input type="button"> globally

Change appearance of buttons, but not input boxes, checkboxes, etc.

         

RJell

4:54 pm on Feb 5, 2004 (gmt 0)

10+ Year Member



This may be impossible, but I thought I'd ask:
I'm the webmaster for a fairly large site, so I don't have complete control over every page that is authored. Long ago, I created a class that I could apply to buttons that would make them black with white text. My problem arises when someone who does not know this creates a form but doesn't apply the class to their "submit" button, resulting in the default grey.

Does anyone know of a way to globally define a style for <input type="button"> or <input type="submit"> that do not have classes applied to them, without affecting the appearance of the other form elements (<input type="text", "checkbox", "radio", etc.>)

Thanks!

DrDoc

5:48 pm on Feb 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



globally define a style for <input type="button"> or <input type="submit"> that do not have classes applied to them

input[type=button], input[type=submit] { ... }

Unfortunately, it does not work at all in IE.

RJell

6:00 pm on Feb 5, 2004 (gmt 0)

10+ Year Member



Thanks, I appreciate it.

Shadows Papa

5:27 pm on Feb 6, 2004 (gmt 0)

10+ Year Member



I use this to format my buttons, works great in all the browsers I've used, incuding IE.

input {
font: 8pt Verdana, Arial, Helvetica, sans-serif;
color: #029;
margin: 0px;
padding-top: 1px;
padding-left: 0px;
display: inline;
background: #D5D5D4;
}

I guess it would possibly have affect on other things, but in my case, the "form" is simply an "Order" button next to products.

Shadows Papa