Home > Web Front-end > HTML Tutorial > Set the background color of tr. It looks very uncomfortable at the moment_html/css_WEB-ITnose

Set the background color of tr. It looks very uncomfortable at the moment_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:56:49
Original
1768 people have browsed it

Setting the cellspacing attribute in the table causes the background color of tr to be intermittent. I wonder if there is a big brother or sister who can add the background color of the gaps


Reply to the discussion (solution)

In order to allow me to ask more questions and save some points, haha. By the way, let me ask: How to set the width and height of the html parent container to ensure that the format is not deformed due to the screen size

1. Set the background color of the table

2. Set the width and height of the parent container with specific pixels (px), do not use percentages, so that there is no problem no matter how the screen changes.

1. Set the background color of the table

2. Set the width and height of the parent container with specific pixels (px), do not use percentages, so It doesn't matter how the screen changes.


Setting the background color of the table still doesn’t work


Remove cellspacing and give tr+ padding attribute
Your description clearly proves that you don’t need cellspacing

Related labels:
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