How do I remove the double border on this table?

前端 未结 4 794
挽巷
挽巷 2020-12-12 07:41

I am working on the HTML and CSS and I get this result which is not perfect:

\"enter

4条回答
  •  旧巷少年郎
    2020-12-12 08:00

    Add the border-collapse:collapse; to the table css selector. This will eliminate that nested border look. Also, your Text:align:center; should really be text-align:center;

    Fiddle: http://jsfiddle.net/GParb/1/

    CSS

    table{
        width:100%;
        border-collapse:collapse;
        text-align:center;
        border:1px solid #00F;
        font-size:12px;
        }
    

    Unlike the cellspacing="0" as suggested below, this answer will collapse the borders to not be a 3D effect, just like what the OP asked for.

    Comparison fiddle: http://jsfiddle.net/GParb/7/

提交回复
热议问题