Forum Moderators: not2easy

Message Too Old, No Replies

Can't align text in adjacent table cells

         

dpinion

4:29 pm on Jan 22, 2008 (gmt 0)

10+ Year Member



I am having the same problem with Firefox and IE. I place the text below in the table cells in the same row, and the text in the right cell shows a line below the cell on the left.

I had to put in the "vertical-align:text-top" style in the right cell to align them properly.

Is there anything I am overlooking? It seems like I should not have to include this style.

<tr>
<td class="iptv_cont">
<h3>STAYING CURRENT</h3><br />
As broadband penetration into the home continues to grow, Internet Protocol Television or IPTV will become more and more prevalent. The rate of adoption of IPTV is accelerating due in large part to the bundling of broadcast television, video on demand (VoD), telephone service via Voice over Internet Protocol (VoIP) and Internet access. This bundling capability is often referred to as the “triple play”. IPTV offers many interactive features and services that appeal to the home users, IPTV service providers and the advertising community.
</td>

<td class="iptv_cont">
<h3>PROVIDING SOLUTIONS</h3><br />
The PICMG® 1.3 SHB supports the system’s future PCI Express™ and current PCI/PCI-X option cards while featuring two Quad-Core Intel® Xeon® Processors (5300 series) to deliver the computing horsepower necessary to help turn the speed and content flexibility promises of IPTV into reality.
</td>
</tr>

and the CSS:

.iptv_cont
{
font-family:Arial, Helvetica, sans-serif;
font-size:small;
padding-right:5px;
padding:1em 1em 1em 1em;
}

SuzyUK

4:54 pm on Jan 22, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It seems like I should not have to include this style.

Yes, you did the right thing although you could apply

vertical-align: top;
to all the cells, <td>'s

Table cells vertically align their content to the center of the cell by default, which sounds like what you were describing. your override was right if you want it to align top, but do it for the whole table, or row to avoid having to know the content height in advance

dpinion

5:04 pm on Jan 22, 2008 (gmt 0)

10+ Year Member



Thanks for that Suzy. I guess where I got confused is that if I had no vertical-align method set for any cells, one cell displayed with the text at the top, while the other displayed with the text in the middle vertically. Thanks for the tip on using the <tr> though, I will change over to doing that.