Jump to content

submit button


The Little Guy

Recommended Posts

is it possible to apply style to objects that are of certain type?

 

So... if I only wanted to apply style to inputs, where the input type is a submit button, and NOT a checkbox, radio button, select box, and so on... How would I be able to do that?

 

I would also like to not use a class.

 

Is this even possible?

Link to comment
https://forums.phpfreaks.com/topic/55298-submit-button/
Share on other sites

this is called an attribute selector.  it will work, but only in those browsers that support it (it should be noted that IE does NOT support it, making it relatively useless):

 

input[type=submit]
{
  style here;
}

 

or

 

input[type=button]
{
  style here;
}

 

although you don't want to use a class, it might be your only option supported well enough to make it worthwhile.

Link to comment
https://forums.phpfreaks.com/topic/55298-submit-button/#findComment-273337
Share on other sites

you can give your inputs an id or class (class can be applied to mulitple elements on one page) and use that to style them. Admittedly its not as nice as the attribute selector but it does work in more browsers.

<input type="submit" class="bttn" name="submit" id="submit" value="Go" />

 

input.bttn
{
background: #ccc;
color: #333;
}

 

note that some browsers on mac os DON'T style buttons anything like what you'd expect!!!!

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/55298-submit-button/#findComment-273522
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.