Use CSS to control the data displayed by the gridview

Source: Internet
Author: User
Alternating rows

The alternate line is generally used to set the background color change. follow these steps:

1. Define the CSS style of the alternating rows. alternatingrowstyle {Background: # f8f8f8 ;}

2. Apply the style in Add a line below to introduce the CSS style

Girdview display table control problems

Similar to table control, you can connect to the CSS file without defining it in the gridview.

Table {border-collapse: collapse;/* key attribute: Merge the outer and outer borders of the table (in fact, the outer border of the table has 2px and 1px, and there is also 1px )*/

Border: solid # f3f9ff;/* set border attributes; style (solid = solid line), color (#999 = gray )*/

Border-width: 1px 0 0 1px;/* set the Border Width: Top right bottom left = Corresponding: 1px 0 0 1px */

Color: #375b91 ;}

Table caption {font-size: 14px; font-weight: bolder ;}

Table TD {border: solid # f3f9ff; border-width: 0 1px 1px 0; padding: 2px ;}

Table tr. altrow {Background: red ;}

Tfoot TD {text-align: center ;}

Table Th {border: solid # f3f9ff; border-width: 0 1px 1px 0; padding: 2px; Background-color: # f3f9ff}

Div Control

# Box {

Border: 1px solid # d9e6f0;

Padding-bottom: 5px ;}

<Div id = "box"> in use!

# Box H3 {Background: # f3f9ff; border-bottom: 1px solid # d9e6f0; color: #375b91; padding: 5px; font-size: 14px; text-align: Left ;} it is used in combination with the above box to form a common classification box on the website. For example,
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.