+ Reply to Thread
Results 1 to 3 of 3

Thread: html tables: specifying dimentions

  1. #1
    taekwondokid42 is offline x10 Lieutenant taekwondokid42 is an unknown quantity at this point
    Join Date
    Aug 2007
    Posts
    268

    html tables: specifying dimentions

    I can specify the width, but I'm having trouble telling the server how long to make my tables. How can I do this?


    edit: I've realized that I can make the table longer, but how do I make the table shorter than the default?

    ie: I cannot make the height less than 50, but I want it to be 35.
    Last edited by taekwondokid42; 02-22-2009 at 08:41 AM.

  2. #2
    leafypiggy's Avatar
    leafypiggy is offline Community Advocate leafypiggy is on a distinguished road
    Join Date
    Aug 2007
    Location
    Massachusetts
    Posts
    2,228

    Re: html tables: specifying dimentions

    Table length is automatically parsed corresponding to how many rows you have in your table.
    Neil Hanlon | x10Hosting Support Representative
    Neil[at]x10hosting.com
    █ I'm always happy to help. Just ask a question in Free Hosting
    Terms of Service IRC

  3. #3
    freecrm's Avatar
    freecrm is offline x10 Elder freecrm is an unknown quantity at this point
    Join Date
    May 2008
    Location
    UK
    Posts
    629

    Re: html tables: specifying dimentions

    Generally, tables by default will fit the contents.

    i.e., if you have a table with no settings, each cell will default to fit the text size.

    This means that a table with 4 rows for instance but nothing in any of the cells will have a height proportional to 4 x the text height + the default padding.

    You can over-ride these in the css.

    I don't think the table css itself makes much difference but if you alter the cell heights, it should do what you want.

    i.e.

    td {
    max-height: 35px;
    margin: whatever;
    padding: whatever;
    overflow: auto;
    }

    Alternatively, you may want to just change the text size for each cell which will have a similar effect.

    If you want the whole table to be shorter, you'll have to put it into another container and then specify a max-height for that container - with overflow: auto

    Just be wary of different browsers though - especially IE6!

    Not sure what you mean by "telling the server how long to make my tables" - this isn't a server instruction, unless you wanted to make the css definitions into say php variables???

+ Reply to Thread

Similar Threads

  1. Hybrid's HTML Lessons
    By Hybrid in forum Tutorials
    Replies: 18
    Last Post: 11-28-2009, 02:12 PM
  2. PHP MySQL HTML generating tables... after..fetching recods
    By anuj_web in forum Programming Help
    Replies: 12
    Last Post: 05-08-2008, 07:41 PM
  3. Html tables messed up when i use css
    By thecarver in forum Scripts & 3rd Party Apps
    Replies: 8
    Last Post: 07-10-2006, 01:26 AM
  4. [IPB] Contiguous Board Index
    By phenetic in forum Tutorials
    Replies: 5
    Last Post: 09-18-2005, 10:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers