Select example for making a webpage form using DIV + CSS

Source: Internet
Author: User

We have seen various input buttons defined by CSS, but the select statement cannot be implemented simply by defining input. The following provides another css definition method to dazzle your select.
CSS section:

The code is as follows: Copy code
. Select *{
Margin: 0;
Padding: 0;
}
. Select {
Border: 1px solid # cccccc;
Float: left;
Display: inline;
    }
. Select div {
Border: 1px solid # f9f9f9;
Float: left;
}
/* Sub-selector, which can be recognized in non-IE browsers such as FF */
. Select> div {
Width: 120px;
Height: 17px;
Overflow: hidden;
    }
    
/* Wildcard selection character, which is recognized only in IE browser */
* Html. select div select {
Display: block;
Float: left;
Margin:-2px;
}
. Select div> select {
Display: block;
Width: 124px;
Float: none;
Margin:-2px;
Padding: 0px;
}
. Select: hover {
Border: 1px solid #666666; // effect of moving the cursor over
}
. Select> option {
Text-indent: 2px; // option is indented by non-IE browsers such as FF 2px
}
XHTML section:
<Div class = "select">
<Div>
<Select>
<Option> Webpage Tutorial network </option>
<Option> Webpage Tutorial network </option>
<Option> Webpage Tutorial network </option>
</Select>
</Div>
</Div>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.