Why is heading tag increasing cell height?

Discussion in 'HTML' started by affiliateian@gmail.com, Mar 23, 2006.

  1. Guest

    I am using a table with 2 rows and 1 column. The top row is the heading
    for a short title (1 line of text) and the 2nd row is for paragraph
    text. When I add any heading tags, <h1>, <h2> etc... to row 1, the cell
    height of row 1 gets increased as if 1 or 2 <br> tags has been added.

    Started to notice this after I began using CSS to help streamline my
    website. My CSS settings for headings are simple like so:

    font-family : Verdana, Arial, Helvetica, sans-serif;
    font-size : 14pt;
    color : black;

    This happens with all different table types. Even tables which do not
    have a CSS id. What can be causing this? Is it normal? Any ideas?
     
    , Mar 23, 2006
    #1
    1. Advertising

  2. wrote:
    > I am using a table with 2 rows and 1 column. The top row is the heading
    > for a short title (1 line of text) and the 2nd row is for paragraph
    > text. When I add any heading tags, <h1>, <h2> etc... to row 1, the cell
    > height of row 1 gets increased as if 1 or 2 <br> tags has been added.
    >
    > Started to notice this after I began using CSS to help streamline my
    > website. My CSS settings for headings are simple like so:
    >
    > font-family : Verdana, Arial, Helvetica, sans-serif;
    > font-size : 14pt;
    > color : black;
    >
    > This happens with all different table types. Even tables which do not
    > have a CSS id. What can be causing this? Is it normal? Any ideas?
    >


    Margins on the headings.

    TD H1, TD H2, TD H3 { margin: 0; }

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Mar 23, 2006
    #2
    1. Advertising

  3. Guest

    Fantastic, that worked!!! 5 stars for you!
     
    , Mar 23, 2006
    #3
  4. Neredbojias Guest

    With neither quill nor qualm, quothed:

    > I am using a table with 2 rows and 1 column. The top row is the heading
    > for a short title (1 line of text) and the 2nd row is for paragraph
    > text. When I add any heading tags, <h1>, <h2> etc... to row 1, the cell
    > height of row 1 gets increased as if 1 or 2 <br> tags has been added.
    >
    > Started to notice this after I began using CSS to help streamline my
    > website. My CSS settings for headings are simple like so:
    >
    > font-family : Verdana, Arial, Helvetica, sans-serif;
    > font-size : 14pt;
    > color : black;
    >
    > This happens with all different table types. Even tables which do not
    > have a CSS id. What can be causing this?


    The headings, of course. Headings have vertical whitespace. The can
    usually be styled with the css "margin" and "padding" attributes.

    eg:

    <h1 style="margin:0">My Nose</h1>

    > Is it normal? Any ideas?
    >
    >


    --
    Neredbojias
    Contrary to popular belief, it is believable.
     
    Neredbojias, Mar 23, 2006
    #4
  5. wrote:

    > I am using a table with 2 rows and 1 column. The top row is the
    > heading for a short title (1 line of text) and the 2nd row is for
    > paragraph text. When I add any heading tags, <h1>, <h2> etc... to row
    > 1, the cell height of row 1 gets increased as if 1 or 2 <br> tags has
    > been added.


    Please look into not using tables for layout.

    > Started to notice this after I began using CSS to help streamline my
    > website. My CSS settings for headings are simple like so:
    >
    > font-family : Verdana, Arial, Helvetica, sans-serif;


    http://xs4all.nl/~sbpoley/webmatters/verdana.html

    > font-size : 14pt;


    That's smaller than my default size for content text. Consider setting
    the body text to 100% (points are for print media), and setting the font
    size for your headings at some percentage larger than 100.

    body { font-size: 100%; }
    h1 { font-size: 140%; }
    h2 { font-size: 125%; }
    ..legalese { font-size: 85%; }

    --
    -bts
    -Warning: I brake for lawn deer
     
    Beauregard T. Shagnasty, Mar 23, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tshad
    Replies:
    6
    Views:
    412
    James Thomas
    Jan 5, 2005
  2. shruds
    Replies:
    1
    Views:
    893
    John C. Bollinger
    Jan 27, 2006
  3. Replies:
    0
    Views:
    575
  4. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,129
    Smokey Grindel
    Dec 2, 2006
  5. venu
    Replies:
    0
    Views:
    547
Loading...

Share This Page