I am still using tables to set up my web pages and keep my Nav Bar links in one cell. I know how to align the links to the left, right or center using td align="" but how do you get alignment to the top or bottom of the table cell you are working in ?
Help would be much appreciated
Positioning stuff in tables - Post ID...
You may want to click on profile and change your forum name to something other than your email address, just to help keep you spam level down.
Are you using an external CSS or Style in the head of your page? If so, you can use this:
td {
vertical-align: bottom
}
If you are using inline style, you can use
<td style="vertical-align:bottom;"> but that is a lot of code if you have very many cells that you want to use styles to set text position.
If you want to have some cells align to the top, others in the middle, and others on the bottom, you can use an external style sheet, or a style section in the head of your page that looks like this:
td.up {
vertical-align: top;
}
td.mid {
vertical-align: middle;
}
td.dn {
vertical-align: bottom;
}
Then in the cells use class statements like this:
<td class="up"> <td class="mid"> <td class="dn">
Here is a link to the W3Schools vertical-align page http://www.w3schools.com/css/pr_pos_vertical-align.asp
One of the very nice things about using CSS is that you can set several classes and have different borders, different fonts, different background colors, and have all that in one location so you can easily change every style on a site with a single change.
Hope this helps.
Are you using an external CSS or Style in the head of your page? If so, you can use this:
td {
vertical-align: bottom
}
If you are using inline style, you can use
<td style="vertical-align:bottom;"> but that is a lot of code if you have very many cells that you want to use styles to set text position.
If you want to have some cells align to the top, others in the middle, and others on the bottom, you can use an external style sheet, or a style section in the head of your page that looks like this:
td.up {
vertical-align: top;
}
td.mid {
vertical-align: middle;
}
td.dn {
vertical-align: bottom;
}
Then in the cells use class statements like this:
<td class="up"> <td class="mid"> <td class="dn">
Here is a link to the W3Schools vertical-align page http://www.w3schools.com/css/pr_pos_vertical-align.asp
One of the very nice things about using CSS is that you can set several classes and have different borders, different fonts, different background colors, and have all that in one location so you can easily change every style on a site with a single change.
Hope this helps.
Dear Bill;
Many thanks
The vertical-align:top tag was all I needed, works great
Not using CSS yet, I know it would be easier but still learning the basics.
Again many thanks for your quick help
You are awesome!
Many thanks
The vertical-align:top tag was all I needed, works great
Not using CSS yet, I know it would be easier but still learning the basics.
Again many thanks for your quick help
You are awesome!
You may find it easier to start learning css as you are learning html. Rather than learning code that has been depreciated, you can learn the current code. Using CSS should help the pages load faster.
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.