Selecting for buttons works fine:
input[type="submit"]
{
background:#efefef;
width:auto;
padding:5px;
color:#666;
font-size:16px;
font-weight:bold;
padding:5px 15px;
}
But I can't seem to get anything to work for drop down boxes, this doesn't work:
input[type="select"]
{
background:#000;
}
Am I selecting it correctly? Can you do it this way?
The CSS id Selector The id selector uses the id attribute of an HTML element to select a specific element. The id of an element is unique within a page, so the id selector is used to select one unique element! To select an element with a specific id, write a hash (#) character, followed by the id of the element.
The ::selection CSS pseudo-element applies styles to the part of a document that has been highlighted by the user (such as clicking and dragging the mouse across text).
It is possible to give several items on your page the same style even when they don't have the same class name. To do this you simply list all of the elements you want to style and put a comma between each one.
The CSS universal selector ( * ) matches elements of any type. The universal selector is a special type selector and can therefore be namespaced when using @namespace .
Try this:
select {
background:#000;
}
As I know, there is no <input type="select" />
, just <select></select>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With