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: