Okay folks, I've been playing with this table all day long and cannot seem to get the first cell/column width adjusted. I also want to have the text in this cell/column right aligned and bold. One reference said to use the following:
table { width: ###px; }
td.cellone { width: ###px; }
td.celltwo { width: ###px; }
When I tried to use this style declaration it just put the data outside of the table:
<table>
<tr>
<td.cellone>April 21, 1729</td.cellone>
<td.celltwo>Sophia Augusta Frederica of Anhalt-Zerbst</td.celltwo>
</tr>
</table>
I am attempting to have the data look like this except that the data information is in bold:
April 21, 1729 Sophia Augusta Frederica of Anhalt-Zerbst was born in Germany. She later
ruled Russia under the name Catherine II. (Catherine the Great)
1756-1763 Seven Years' War. Important factor in bring Germans to Lower Volga to
establish colonies.
June 28, 1762 Catherine II ascends the throne of Russia.
The table is in my main content section. This is the css code I have set up:
#maincontent{
position: relative;
float: left;
width: 600px;
font-size: 15px;
font-family: Verdana, Helvetica, Arial, sans-serif;
padding-right: 15px;
}
table, td {
border-style: solid;
border-collapse: collapse;
vertical-align: text-top;
width: 575px;
}
td {
border-spacing: 20px;
}
I removed the td.cellone & td.celltwo since it wasn't working correctly. Also, in the final product the border-style and border-collapse will be replaced with border-none. I just have them showing while creating the table.
Thanks.
Adjusting Cell/Column Width in a...
You are going to have to give the cell a class name.
So even though the actual css may be ok, in the table you must add
You should probably be giving your borders a colour and a size also. You can write a border in shorhand
See if this makes any difference
So even though the actual css may be ok, in the table you must add
<td class="cellone">
etc.It is not necessary to add the class into the closing tag of the cell.You should probably be giving your borders a colour and a size also. You can write a border in shorhand
border: 2px #000000 solid;
See if this makes any difference
Janys,
That was it, just <td class="cellone"> did the trick.
Thank you so much.
That was it, just <td class="cellone"> did the trick.
Thank you so much.
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.