46 users online (0 members and 46 guests)  

Thread: Table help..


  Results 1 to 4 of 4

Related

  1. Table help    Forum: HTML Forum
    Replies: 3
  2. Table    Forum: HTML Forum
    Replies: 0
  3. Table Help!!    Forum: HTML Forum
    Replies: 1
  4. Replies: 5
  5. a table    Forum: CSS Forum
    Replies: 13
  1. #1
    Whyl's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2004
    Posts
    2

    Question Table help..

    i have a problem, when i specify the size (width, height) of a cell, and then i type stuff in it WITHOUT <br>'s, and the cell stretch or shrink according to the majority length of the lines of text.

    can someone give me a solution to have the text(paragraph) minipulated by the cell and not the other way around please?
    isnt there a tag that locks each cell,colum,row in a table in place so it doesnt move around
    Last edited by Whyl; 01-09-2004 at 03:25 PM. Reason: wuts going on with the color!! cant see it?????

  2. #2
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732
    Hi there Whyl
    I have a problem, when I specify the size (width, height) of a cell, and then I type stuff in it without <br>'s,
    the cell stretches or shrinks according to the majority length of the lines of text.

    Can someone give me a solution to have the text(paragraph) minipulated by the cell and not the other way
    around please?
    Isn't there a tag that locks each cell,colum,row in a table in place so it doesnt move around ?
    If you specify the width of the <td> the height will
    stretch to accomodate the text thus.....

    Code:
    <table><tr>
    <td style="width:200px;border:solid 1px #000000;"><p style="padding:10px;">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent blandit venenatis purus. Integer massa libero, vehicula id, consequat sed, tincidunt nec, purus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Suspendisse potenti. Nunc vulputate magna non magna. Aenean lorem eros, adipiscing quis, semper non, dictum a, nunc. Curabitur ut sem. Pellentesque a est id neque hendrerit ultrices. Donec vulputate tincidunt turpis. Curabitur dignissim vestibulum nunc. Aliquam felis lorem, ultrices sit amet, convallis a, accumsan vel, ante. Proin aliquam turpis sed augue. In pellentesque, magna a pulvinar adipiscing, est orci adipiscing felis, sed laoreet urna magna quis neque. Proin facilisis aliquet urna.</p></td>
    </tr></table>
    If you wish the <td> cell dimensions to remain fixed
    then you must intoduce a vertical scrollbar thus...

    Code:
    <table><tr>
    <td style="width:200px;height:300px;border:solid 1px #000000;"><div style=width:200px;height:300px;overflow:auto;padding:10px;"><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent blandit venenatis purus. Integer massa libero, vehicula id, consequat sed, tincidunt nec, purus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Suspendisse potenti. Nunc vulputate magna non magna. Aenean lorem eros, adipiscing quis, semper non, dictum a, nunc. Curabitur ut sem. Pellentesque a est id neque hendrerit ultrices. Donec vulputate tincidunt turpis. Curabitur dignissim vestibulum nunc. Aliquam felis lorem, ultrices sit amet, convallis a, accumsan vel, ante. Proin aliquam turpis sed augue. In pellentesque, magna a pulvinar adipiscing, est orci adipiscing felis, sed laoreet urna magna quis neque. Proin facilisis aliquet urna.</p></div></td>
    </tr></table>


    cthead

  3. #3
    Whyl's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2004
    Posts
    2
    after all the cell,row,colum have been given height and width, but when i type in something, the cell either shrink or expand according to the length of the text lines.

    here are 2 html urls
    1.http://aa.1asphost.com/Whyl/help/story.html
    2.http://aa.1asphost.com/Whyl/help/index.html
    they are index and story, so when u open it up on the left of the site just compare the tables on "home" and "story line" links, cause the rest wont work.

    notice the cell that contains the poll is different in each page but in the script its exactly the same.

    is there a tag that locks cells in place so text is minipulated by cell instead of the other way around?

  4. #4
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    I have only eyeballed the page and code. It is obvious that there is a problem with rowspan/colspans. I ran it through the HTML validator, though it picked up on many errors, it did not report any table problems.

    You have a pretty complicated table structure, having the borders makes it easier to see what is what though. If you look at the top right corner of the table you will see a missing cell. So the error is probably in either the code for the first row, or the code with the last colum. Tables must be square, they cannot be L shaped.

    With this said, I am not sure what you are trying to accomplish. If I understand, you do not want the cell size to increase, regardless of how much content. This is an impossibilty, you cannot fit War and Peace in a cell 20x100.

    If your problem is that neighboring cells stretch out when 1 cell has lots of content, then you need to use nested tables. Nested tables are accomplished by placing child tables inside of parent cells.

    Here is an easy example of nested tables.

    First create a 1 row 2 cell table, I will leave out all attributes (width, border etc.) so that it is easier to follow.

    HTML Code:
    <table>
    <tr>
    <td valign="top">
    </td>
    <td valign="top">
    </td>
    </tr>
    </table>
    Notice I did include the valign="top" attribute, it is very important to include this in every parent cell.

    Next all we have to do is include the child tables to give us this final code.

    HTML Code:
    <table>
    <tr>
    <td valign="top">
    <table>
    <tr>
    <td>
    left content
    </td>
    </tr>
    </table>
    </td>
    <td valign="top">
    <table>
    <tr>
    <td>
    right content
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    Another problem I noticed is with your form tags. Be sure that the form tags are not inside of your table, this adds a blank space. You should place the form tags outside the table.

    Dave



Tags for this Thread