Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jul 2006
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Decreasing height of rows

    For some odd reason l am getting large spaces between rows of the tables. i.e. cannot work out where in the coding to decrease the row space between the text.
    See screenshot. I am assuming l need to decrease the row height but cannot work out using a text editor not WYSIWYG how to do this.
    Attached Images Attached Images

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Decreasing height of rows

    <P ID="edit" class=small>(Edited by Jezza on 25-Sep-07 18:50. To add PS)</P>Without seeing your code I am assuming that as you mention table you are using the <table><td><tr> construct, try this is between the head tags:

    <style>
    tr {
    height: 50px;

    }

    </style>

    Adjust to your requirement. If this does not work please supply the code so that I can refer to it <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

    PS Thinking about this, it could be something to do with the cell padding, again your code sample will help
    Jerry

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Decreasing height of rows

    Row height probably is determined by the line-height of the text. Example:

    <code><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Row Height</title>
    <style type="text/css">
    body, p, td {font-size: 1em;}
    td {border:1px solid black; padding:0 4px;}
    .shortLines {line-height:1em;}
    .tallLines {line-height:2em;}
    </style>
    </head>
    <body>
    <table class="shortLines">
    <tr><td>Text</td><td>More text</td></tr>
    <tr><td>Text</td><td>More text</td></tr>
    <tr><td>Text</td><td>More text</td></tr>
    </table>
    <table class="tallLines">
    <tr><td>Text</td><td>More text</td></tr>
    <tr><td>Text</td><td>More text</td></tr>
    <tr><td>Text</td><td>More text</td></tr>
    </table>
    </body>
    </html></code>

Posting Permissions

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