Forum Moderators: not2easy

Message Too Old, No Replies

Vertical Alignment

         

jshpik1

4:59 am on Aug 19, 2007 (gmt 0)

10+ Year Member



Hello,

I'm trying to vertically align to center some text... and it's not working. I've tried that Veritcal Align to Center Guide on here and it's not helping. I don't understand why valign="middle" isn't working in the cell tag. I've also tried vertical-align: middle in the nav part of CSS. I started having issues when I put the H1 tag in there.

Anyway here it is....

For the CSS:


h1,h2
{ font-family: Verdana, Arial, Helvetica, sans-serif; font-size : 22px; font-weight : bold; text-decoration : none; line-height : 100%; color : #000000; }

.nav
{ font-weight: bold; font-size: 11px; color : #C10003; }
a.nav
{ text-decoration: none; color : #C10003; font-size : 11px; }
a.nav:visited
{ text-decoration: none; color : #C10003; font-size : 11px; }
a.nav:hover
{ text-decoration: underline; color : #C10003; font-size : 11px; }

For the HTML:


<tr>
<td colspan="6" align="left" nowrap="nowrap" height="18"><h1><a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h1></td>
</tr>

Thanks.

scriptmasterdel

2:20 pm on Aug 19, 2007 (gmt 0)

10+ Year Member



"H" Tags automatically are assigned with a margin value, try removing this value by declaring "margin: 0".

jshpik1

2:32 pm on Aug 19, 2007 (gmt 0)

10+ Year Member



Tried it by adding margin : 0; to the h CSS, then adding valign="middle" to td. Didn't work bummer.

HarryM

5:29 pm on Aug 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try adding display:inline; to the h1,h2 styles.