I have a table at http://dot.kr/x-test/tableDiv/table1.php.
Each cell is nested by two red lines.
I like to make it that each cell is nested by just one line.
I have a table at http://dot.kr/x-test/tableDiv/table1.php.
Each cell is nested by two red lines.
I like to make it that each cell is nested by just one line.
Would border-spacing: 0
be valid? Lines would look a bit thicker since you’re adding bordert to both table and cells but it would look as one line
Thank you, molona.
I made it at http://dot.kr/x-test/tableDiv/table3.php by your help.
table {border-collapse: collapse;}
would reduce the width to one line.
Thank you very much, ronpat.
I made it at http://dot.kr/x-test/tableDiv/table5.php by your help.
I guess that http://dot.kr/x-test/tableDiv/table5.php is much better than http://dot.kr/x-test/tableDiv/table3.php
What’s the difference between
border-spacing: 0
and changing to
border: 0.5px solid red;
and
table {border-collapse: collapse;}
They both end up with the same look, but I’m thinking there must be times when one way would be preferred over the other. Or not?
I have a table at http://dot.kr/x-test/tableDiv/table5.php.
I have changed it from table to div at http://dot.kr/x-test/tableDiv/table6.php.
Did I correctly make it?
is there any redundancy at http://dot.kr/x-test/tableDiv/table6.php?
It’s not usually viable to work in fractions of pixels, so I wouldn’t advise that method. Ron’s border-collapse
is what’s appropriate here.
Whether or not that’s appropriate depends on the kind of data you’ll be placing in those cells. If it’s tabular data, then stick to an HTML table.
If the user wants double width lines, {border-spacing:0} will do that nicely.
A viewing screen cannot illuminate half a pixel so how that is rendered becomes browser dependent.
{border-collapse:collapse} overrides border-spacing.
I have a table at http://dot.kr/x-test/tableDiv/table7.php
I like to make it without table.
I already change http://dot.kr/x-test/tableDiv/table5.php which has table
to http://dot.kr/x-test/tableDiv/table6.php without table.
However, there is colspan and rowspan at http://dot.kr/x-test/tableDiv/table7.php
I don’t know how I can change “colspan and rowspan” in table to what in div?
There is no CSS equivalent to the HTML attributes colspan and rowspan. Those attributes are only available to HTML tables.