Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Aug 2005
    Posts
    11
    Member #
    11024
    Hi.
    I have a table, and i'm trying to set a fixed row height. But the row adjusts itself to allow the content to fit.
    How can i have a fixed row height?


    Thanks.
    Cowlauncher.

  2.  

  3. #2
    Senior Member
    Join Date
    May 2005
    Location
    Essex, United Kingdom
    Posts
    200
    Member #
    10131
    Why don't you want the rest of the content to be seen?, what about the rest of the content. I don't get why you would want to do this.

    Anyway, this code should work
    Code:
    HTML:
    <td class="fixed">
    CSS:
    .fixed {height:20px;overflow:hidden}

  4. #3
    Junior Member
    Join Date
    Aug 2005
    Posts
    11
    Member #
    11024
    Yeh, well that was the first thing i thought to try. But the cell will still make itself larger to fit the content.

  5. #4
    Junior Member
    Join Date
    Aug 2005
    Posts
    11
    Member #
    11024
    *cough* *splutter*
    /bump

  6. #5
    Senior Member
    Join Date
    May 2005
    Location
    Essex, United Kingdom
    Posts
    200
    Member #
    10131
    Have you got the code so far so i can have a look?

  7. #6
    Junior Member
    Join Date
    Aug 2005
    Posts
    11
    Member #
    11024
    Code:
    table {
    	width: 150px;
    	padding: 0;
    	margin: 2px;
    }
    
    td {
    	vertical-align: top;
    	padding: 0;
    }
    
    th {
    	font-weight: bold;
    	text-align: right;
    	vertical-align: top;
    	padding: 0;
    }
    
    tr {
    	padding: 0 0 0 2px;
    }
    
    <table>
    	<tr height="67"><th>0900</th>	<td>GMA with Bert Newton</td></tr>
    	<tr height="10"><th>1100</th>	<td>Huey's Cooking Ad...</td></tr>
    	<tr height="23"><th>1130</th>	<td>Ten News</td></tr>
    </table>
    I'm creating a tv guide, and the height of each is cell is proportionate to the length of the program.

  8. #7
    Junior Member
    Join Date
    Aug 2005
    Posts
    11
    Member #
    11024
    Okay i've tried to simplify down as much as i can. Now all i have is:
    Code:
    <table>
    	<tr><td style="height: 10px; overflow: hidden;">Test Text<br />Test Text</td></tr>
    </table>
    The cell should be 10px high! But it always stretches to make sure the text can fit.

  9. #8
    Junior Member
    Join Date
    Aug 2005
    Posts
    11
    Member #
    11024
    anyone?


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:12 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com