Results 1 to 4 of 4

Thread: Specify TD height = 5px

  1. #1
    Join Date
    Nov 2005
    Location
    Austin TX,US
    Posts
    71
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Specify TD height = 5px

    I have an html table of data. I want to have some blank rows to separate different kinds of data. Those blank rows I want to spcify their height = 5px, but it doesn't seem to work. The row height is always about 12px;

    It sounds like an easy and stupid question, but how can I do it to make it really work really?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Avoid tables whenever possible.

    The layout height of a cell is its height plus 2 times its padding or cellpadding and 2 times its margin or cellspacing. Into this mix you can in some cases add borders. Also taken into account can be the font height as determined by the font-size. Different browsers look at many of these things differently.

    To be more specific, we would need to have a link to your page.
    Last edited by jscheuer1; 08-02-2007 at 06:31 AM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Feb 2007
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    To get around the above post what i do is give it a class of .something then in a css page specify the .something font size as something very small amoung giving it other properties, then i remove the &nbsp; from those cells so its just <td></td> It works in a few browsers but not all, i siggest spacing cells with borders.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Avoid tables whenever possible.
    There's nothing wrong with using tables for real tabular data; in fact, it's what they're designed for, and much preferable to abusing other elements to this purpose.

    Tabo, beware: a lot of browsers will not show a table cell with no content.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •