Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS Select Selector

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?

like image 974
Tom Gullen Avatar asked May 31 '11 10:05

Tom Gullen


People also ask

How do I select a CSS selector?

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.

What is :: selection in CSS?

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).

How do I select multiple selectors in CSS?

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.

What does the universal selector (*) Select?

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 .


1 Answers

Try this:

select {
    background:#000;
}

As I know, there is no <input type="select" />, just <select></select>.

like image 116
aorcsik Avatar answered Sep 23 '22 14:09

aorcsik