HTML + CSS instances-beautiful query components (1)

Source: Internet
Author: User

Ii. effect:

 


3. HTML


[Html]
<Div id = "search-box">
<Asp: TextBox ID = "txtSearch" runat = "server" class = "searchTextBox"/>
<Asp: Button ID = "btnSubmit" runat = "server" class = "submitButton" Text = "Search"/>
</Div>

<Div id = "search-box">
<Asp: TextBox ID = "txtSearch" runat = "server" class = "searchTextBox"/>
<Asp: Button ID = "btnSubmit" runat = "server" class = "submitButton" Text = "Search"/>
</Div>

 

Iv. CSS


[Css]
# Search-box
{
Position: relative;
Float: left;
Width: 265px;
Height: 55px;
Background: url (Images/search-bg.gif) top right no-repeat;
}
 
. SearchTextBox
{
Position: relative;
Float: left;
Margin-top: 14px;
Margin-right: 14px;
Padding: 5px 5px 0 5px;
Height: 22px;
Width: 141px;
Border: 1px solid #000;
Background: #915735;
Margin-left: 14px;
Color: # fdf086;
}
 
. SubmitButton
{
Position: relative;
Height: 29px;
Margin-top: 14px;
Width: 70px;
Background: # D2B277;
Border: 1px solid #3E1210;
Letter-spacing: 1px;
Text-transform: uppercase;
Cursor: pointer;
Font-size: 11px;
}
. SubmitButton: hover
{
Text-decoration: underline;
}

# Search-box
{
Position: relative;
Float: left;
Width: 265px;
Height: 55px;
Background: url (Images/search-bg.gif) top right no-repeat;
}

. SearchTextBox
{
Position: relative;
Float: left;
Margin-top: 14px;
Margin-right: 14px;
Padding: 5px 5px 0 5px;
Height: 22px;
Width: 141px;
Border: 1px solid #000;
Background: #915735;
Margin-left: 14px;
Color: # fdf086;
}

. SubmitButton
{
Position: relative;
Height: 29px;
Margin-top: 14px;
Width: 70px;
Background: # D2B277;
Border: 1px solid #3E1210;
Letter-spacing: 1px;
Text-transform: uppercase;
Cursor: pointer;
Font-size: 11px;
}
. SubmitButton: hover
{
Text-decoration: underline;
}

 

V. Description:

1. After the text box is pre-compiled, it is the "type =" text "label input. The Code is as follows:


[Html]
<Input name = "txtSearch" id = "txtSearch" class = "searchTextBox" type = "text">

<Input name = "txtSearch" id = "txtSearch" class = "searchTextBox" type = "text">
2. The size of the text box is similar to that of the div. The box model shows:

 
 


3. After the button is pre-compiled, it is the tag input of the label type = "submit ".


[Html]
<Input name = "btnSubmit" value = "Search" id = "btnSubmit" class = "submitButton" type = "submit">

<Input name = "btnSubmit" value = "Search" id = "btnSubmit" class = "submitButton" type = "submit">
4. The width and height of the button include the border, and the width: 70px set in CSS; height: 29px;. The actual box model shows:

 

 

 


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.