Table west border style, table border Style

Source: Internet
Author: User

Table west border style, table border Style

Table
{
Border-collapse: collapse;
Border: none;
Width: 200px;
}
Td
{
Border: solid #000 1px;
}


What are the CSS style settings for the table border? More details

1. All <table> are fine borders.
Table, table td, table th {border: 1px solid # ff0000; border-collapse: collapse ;}

2. If the specified <table> is a fine border, place <table> in <div> and use ID as the index, as shown below:
# MdA table, # mdA table td, # mdA table th {border: 1px solid # ff0000; border-collapse: collapse ;}
<Div id = "mdA">
<Table width = "400" border = "0" cellspacing = "0" cellpadding = "0">
<Tr>
<Td> </td>
<Td> </td>
</Tr>
<Tr>
<Td> </td>
<Td> </td>
</Tr>
</Table>
</Div>

How does CSS define different color styles for the horizontal and vertical borders of a Table?

Likewise.
Or use border to define

If you want to define all tables on the page, you can define them as follows:
Table {
Border-top: 1px solid # F00;/* top border */
Border-bottom: 1px solid # F00;/* lower border */
Border-left: 1px solid #000;/* left border */
Border-right: 1px solid #000;/* right border */
}

If you only define a table, you can define it as follows:

. Colorfultable {
Border-top: 1px solid # F00;/* top border */
Border-bottom: 1px solid # F00;/* lower border */
Border-left: 1px solid #000;/* left border */
Border-right: 1px solid #000;/* right border */
}

====================
If all the tables on the page need to be defined, the following can be defined:
Table td {
Border-top: 1px solid # F00;/* top border */
Border-bottom: 1px solid # F00;/* lower border */
Border-left: 1px solid #000;/* left border */
Border-right: 1px solid #000;/* right border */
}

If you only define a table, you can define it as follows:

. Colorfultable td {
Border-top: 1px solid # F00;/* top border */
Border-bottom: 1px solid # F00;/* lower border */
Border-left: 1px solid #000;/* left border */
Border-right: 1px solid #000;/* right border */
}

<Table border = "0" cellspacing = "0" cellpadding = "0" class = "colorfultable">
 

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.