PDA

View Full Version : <h1> tag... odd result..


martekbiz
04-12-2002, 15:49/03:49PM
Hi All,


If someone could look at this site:

http://www.previewmysite.com/lathemlaw.com/NEW/Info/profile.php

Its' one I am currently developing and playing around with SEO techniques.

I made the <h1> tag into a CSS property for the Page Header Title as you will see...

Problem is I get all this white space below the text. I DO NOT want this.. would like it to hug as close as possible to the line below it.

When I don't use <h1></h1> tags it woks no problem..

Any thoughts?

thanks.

Aaron

[Moved to the CSS forum. - Jill]

OptWizard
04-12-2002, 17:11/05:11PM
white space where?

martekbiz
04-12-2002, 17:13/05:13PM
The header Mark Lathem Bio has white space under it which separates it from the line that is below it.

The header should be hugging the line just liek the text on the right is.

Any thoughts.

Aaron

OptWizard
04-12-2002, 17:17/05:17PM
Whats size do you have the header?
Also try and make the cell properties to align bottom.

martekbiz
04-12-2002, 17:23/05:23PM
Originally posted by OptWizard
Whats size do you have the header?
Also try and make the cell properties to align bottom.

Hi.. valign="bottom" was already set.

As for header here is the CSS code for it:

h1
{

font-family: Verdana, Arial, Helvetica, sans-serif;
color: #000000;
font-size: 14pt;
font-weight: bold;
white-space: nowrap;
background: transparent;

}

if I change h1 to .h1 in the CSS and use a tag like class="h1" the Header is display as I want. The problem seems to lie with the <h1> tag.

Here is how it is set:

<td align="left" valign="bottom"><h1>Mark Lathem Bio</h1></td>

Any other thoughts?

Thanks.

Aaron

OptWizard
04-12-2002, 17:34/05:34PM
if i am not mistaken it is the tag?

martekbiz
04-12-2002, 17:36/05:36PM
Originally posted by OptWizard
if i am not mistaken it is the tag?

I'm more than sure that is the problem.. either the tag OR the CSS properties... but what EXACTLY?

martekbiz
04-12-2002, 17:49/05:49PM
Bingo!

Needed to add:

margin-top: 0em;
margin-bottom: 0em;


to the CSS tag for h1

Displays as expected now.

Thanks.

Aaron

dvduval
04-12-2002, 17:51/05:51PM
The only white space below the letters is the space used by the font. Try typing a lower case 'g' and you'll see what I mean.
Solutions:
1) Use a graphic for the text
2) Use a graphic for the line and make it the background image for the cell. You'll have to do the same thing on the cell to the right also.
3) Use a layer

#2 would be my favorite of the 3.

dvduval
04-12-2002, 17:56/05:56PM
You figured it out while I was replying!

martekbiz
04-12-2002, 17:57/05:57PM
Originally posted by dvduval
The only white space below the letters is the space used by the font. Try typing a lower case 'g' and you'll see what I mean.


That is incorrect... if that was the case then when I use the CSS properties:

.contentheader
{

font-family: Verdana, Arial, Helvetica, sans-serif;
color: #000000;
font-size: 14pt;
font-weight: bold;


}

and call then reference it for use in my HTML like <font class="contentheader">Mark Lathem Bio</font>

It displays as it SHOULD.

Therefore it is not a font issue but a tag issue (or so it seemed) that was causing the funky display.

Aaron