Thanks to the contributors on this site, I have managed to complete most of my tables, and in fact,did complete one on my own, with no coing errors and with perfect results.
I almost completed another, but am left with the feeling that I have cheated a bit to get the desired result.
It;s the very first cell, top left.
HTML is:
<td colspan=“3”>Administrative County of<div style=“text-decoration:underline; display:inline;”> Dorset </div></td>
What I want the CSS to do is continue the underlining either side of the word Dorset and run right up to the word of on it’s left.
Is it possible. ? It doesn’t seem possible to underline padding,margin or even whitespace
I tried bottom-border: 1px;
bottom-border-style: solid worked but looked like someone had underlined it with a felt tip rather than the word being underlined.
May I ask a question about something else on this web page.
The styling of the curly brace is great but at the bottom of page 4, it merges into the text slightly.
I can see why it does it. Because the column is slightly narrower, but why should the column be narrower when the cell with the most text in it is the same.
And the style is the same.
It’s not desperate for a solution, but I’d just like to know why !
Remember that table cells adapt to the width of their contents (unless table-layout:fixed is applied).
If you look at the the third line of data in rightmost column, the text “Imbecile from Childhood” is pushing that column wider than the rightmost column in the pages above. As a result, the columns to the left have to squeeze a bit to adapt. It happens that the second column is the most “squeezable”.
You could try inserting <br> tags around the word “or” in the header of column 11 and see if that allows column 11 to absorb some of the squeezing. If it does not, or if the amount is unsatisfactory, then we will need to take a closer look at the column widths and the “pressures” (the data) in each one. You may actually want to give one row of <td> tags column classnames so meaningful widths can be applied to the columns, even though those widths will still be flexible.
If the table did not have a width assigned that is greater than its default (normal) width, your assumption would be true. However, the table has a width:100% assigned, therefore it is stretching wider than it normally would which in turn adds empty space within the cells. By expanding the contents of one of the cells, other cells with unoccupied space are compressed.
You can demonstrate this by temporarily adding an inline style in that particular table tag <table style="width:auto"> and see if the width becomes narrower than the others. That is why the table does not become wider. It doesn’t need to. The cells still have room to hold their contents.