How to make the border of table table 1 pixel in css_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:44:07
Original
1991 people have browsed it

Using tables in Html is an indispensable part of web page production. If we directly set the td border in the table to 1 pixel in css, then the actual effect we see on the web page will be different. Not 1 pixel.

So how do we use css to make the table border 1 pixel?

In fact, it is very simple. Use the css style border-collapse: collapse;

This style means "set a merged border model for the table"

This attribute has been tested , support the browser:

I will write a case below

CSS

/*重点就是要在table上加border-collapse: collapse;这个样式,这个样式是合并边框模型的意思*/table{border-collapse: collapse;width:100%;}tr{}td{border: 1px solid #936943;height:40px;}
Copy after login

HTML

<table>    <tr>        <td></td>        <td></td>    </tr>    <tr>        <td></td>        <td></td>    </tr></table>
Copy after login

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!