Problem with fixing Table cell height

Discussion in 'HTML' started by quietman, Jun 3, 2004.

  1. quietman

    quietman Guest

    Hello all, and here is my problem.

    <html>
    <head>
    <title>Title</title>
    </head>
    <body>
    <table width="748" border="1" cellspacing="0" cellpadding="0"
    bgcolor="#FFFFFF" height="295">
    <tr>
    <td width="374" height="14" colspan="2" valign="top">This cell must
    remain at this height</td>
    <td width="374" colspan="2" rowspan="2" valign="top" height="293">Main
    site content here</td>
    </tr>
    <tr>
    <td width="187" colspan="2" valign="top" height="277">More images/text
    here</td>
    </tr>
    </table>
    </body>
    </html>

    All works well with the cell containing, 'This cell must remain at this
    height' until I begin adding a lot of content to cell containing 'Main site
    content here'. If I add a lot of content such as:

    <html>
    <head>
    <title>Title</title>
    </head>
    <body>
    <table width="748" border="1" cellspacing="0" cellpadding="0"
    bgcolor="#FFFFFF" height="295">
    <tr>
    <td width="374" height="14" colspan="2" valign="top">This cell must
    remain at this height</td>
    <td width="374" colspan="2" rowspan="2" valign="top" height="293">Main
    site content
    here<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
    <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
    <br></td>
    </tr>
    <tr>
    <td width="187" colspan="2" valign="top" height="277">More images/text
    here</td>
    </tr>
    </table>
    </body>
    </html>

    you can see how the top left hand cell begins to crawl down the page.No
    matter what I do, I cannot 'lock' the height of this cell. I do not want it
    to grow.

    Please offer some help if you have a solution.

    Thnak you.
     
    quietman, Jun 3, 2004
    #1
    1. Advertising

  2. quietman

    Karl Groves Guest

    "quietman" <> wrote in message
    news:c9lu92$541$...

    > All works well with the cell containing, 'This cell must remain at this
    > height' until I begin adding a lot of content to cell containing 'Main

    site
    > content here'. If I add a lot of content such as:
    >

    <snip>

    > you can see how the top left hand cell begins to crawl down the page.No
    > matter what I do, I cannot 'lock' the height of this cell. I do not want

    it
    > to grow.
    >
    > Please offer some help if you have a solution.


    The solution is to stop creating the problem.
    First and foremost is the fact that you're using tables for layout.
    Second is that you're attempting to fix a cell's size.
    Third is that you're saying something is a "problem" when the table cells
    are doing exactly what they're supposed to be doing.

    -Karl
     
    Karl Groves, Jun 3, 2004
    #2
    1. Advertising

  3. quietman

    chris Guest

    "quietman" <> schrieb im Newsbeitrag
    news:c9lu92$541$...
    > Hello all, and here is my problem.
    >
    > <html>
    > <head>


    .....

    > you can see how the top left hand cell begins to crawl down the page.No
    > matter what I do, I cannot 'lock' the height of this cell. I do not want

    it
    > to grow.
    >
    > Please offer some help if you have a solution.
    >
    > Thnak you.



    The CSS "table-layout: fixed" might be what you re looking for. The content
    will be cut off if it doesnt fit the cells. Might not be a good idea using
    this.
    chris
     
    chris, Jun 3, 2004
    #3
  4. quietman

    quietman Guest

    "Karl Groves" <> wrote in message
    news:c9m0fh$nd0$...
    >
    > "quietman" <> wrote in message
    > news:c9lu92$541$...
    >
    > > All works well with the cell containing, 'This cell must remain at this
    > > height' until I begin adding a lot of content to cell containing 'Main

    > site
    > > content here'. If I add a lot of content such as:
    > >

    > <snip>
    >
    > > you can see how the top left hand cell begins to crawl down the page.No
    > > matter what I do, I cannot 'lock' the height of this cell. I do not want

    > it
    > > to grow.
    > >
    > > Please offer some help if you have a solution.


    Thanks for the reply....

    > The solution is to stop creating the problem.


    Agreed. A good credo for all the problems of the world as well. Very
    philosophic.

    > First and foremost is the fact that you're using tables for layout.


    Can and would you suggest an alternative please?

    > Second is that you're attempting to fix a cell's size.


    Agreed. Is there anyway to fix a cell's height?

    > Third is that you're saying something is a "problem" when the table cells
    > are doing exactly what they're supposed to be doing.


    Which would be? (other than the obvious of expanding to contain their
    content), there is only one line of content in the cell in question. It's
    height does not need to expand to accommodate it.


    >
    > -Karl



    Cheers.
     
    quietman, Jun 3, 2004
    #4
  5. quietman

    Mark Parnell Guest

    On Thu, 3 Jun 2004 12:43:50 +1000, quietman
    <> declared in alt.html:

    > Can and would you suggest an alternative please?


    http://www.allmyfaqs.com/faq.pl?Tableless_layouts

    > Agreed. Is there anyway to fix a cell's height?


    Agreed that you are creating a problem by trying to achieve that? And
    the answer is no.

    > Which would be? (other than the obvious of expanding to contain their
    > content),


    That's exactly what he's talking about. That's what you are complaining
    about. To be more exact, it is the table row expanding - the row expands
    to fit the highest cell, and the other cells expand to be the same
    height in order to fill the row.

    > there is only one line of content in the cell in question. It's
    > height does not need to expand to accommodate it.


    But the cell next to it, in the same row, does need to expand. Therefore
    the entire row expands. That's the way tables work.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Jun 3, 2004
    #5
  6. quietman

    quietman Guest

    For those with a similar problem, the answer was to use a nested table.

    <html>
    <body>
    <table cellspacing="0" cellpadding="0" border="0">
    <tr>
    <td width="100" valign="top">
    <table cellspacing="0" cellpadding="0" border="0">
    <tr>
    <td width="100" height="20" bgcolor="#FF0000">&nbsp;</td>
    </tr>
    <tr>
    <td bgcolor="#0000FF">&nbsp;</td>
    </tr>
    </table>
    </td>
    <td width="500" rowspan="2" bgcolor="#00FF00">
    <p>a</p>
    <p>a</p>
    <p>a</p>
    <p>a</p>
    <p>a</p>
    <p>a</p>
    <p>a</p>
    <p>a</p>
    <p>a</p>
    <p>a</p>
    <p>a</p>
    <p>a</p>
    <p>a</p>
    <p>a</p>
    <p>a</p>
    </td>
    </tr>
    </table>
    </body>
    </html>

    Works perfectly.

    Thanks anyway to all.
    "Mark Parnell" <> wrote in message
    news:rkq4xesjibxv$...
    > On Thu, 3 Jun 2004 12:43:50 +1000, quietman
    > <> declared in alt.html:
    >
    > > Can and would you suggest an alternative please?

    >
    > http://www.allmyfaqs.com/faq.pl?Tableless_layouts
    >
    > > Agreed. Is there anyway to fix a cell's height?

    >
    > Agreed that you are creating a problem by trying to achieve that? And
    > the answer is no.
    >
    > > Which would be? (other than the obvious of expanding to contain their
    > > content),

    >
    > That's exactly what he's talking about. That's what you are complaining
    > about. To be more exact, it is the table row expanding - the row expands
    > to fit the highest cell, and the other cells expand to be the same
    > height in order to fill the row.
    >
    > > there is only one line of content in the cell in question. It's
    > > height does not need to expand to accommodate it.

    >
    > But the cell next to it, in the same row, does need to expand. Therefore
    > the entire row expands. That's the way tables work.
    >
    > --
    > Mark Parnell
    > http://www.clarkecomputers.com.au
     
    quietman, Jun 3, 2004
    #6
  7. quietman

    Karl Groves Guest

    "quietman" <> wrote in message
    news:c9m5or$822$...
    > For those with a similar problem, the answer was to use a nested table.


    Please do not give any more advice on usenet (or anywhere else) regarding
    HTML

    -Karl
     
    Karl Groves, Jun 3, 2004
    #7
  8. quietman

    quietman Guest

    Karl,

    You sir, are unnecessarily rude and a buffoon.

    Kindly go and screw yourself.

    Have a nice day :)

    "Karl Groves" <> wrote in message
    news:c9m5qk$p9k$...
    >
    > "quietman" <> wrote in message
    > news:c9m5or$822$...
    > > For those with a similar problem, the answer was to use a nested table.

    >
    > Please do not give any more advice on usenet (or anywhere else) regarding
    > HTML
    >
    > -Karl
    >
    >
     
    quietman, Jun 3, 2004
    #8
  9. quietman

    rf Guest

    "quietman" <> wrote in message
    news:c9m6qf$8e8$...
    > Karl,
    >
    > You sir, are unnecessarily rude and a buffoon.


    No matter how much you insult him, he is still correct. Throwing nested
    tables at your problem is so last century. Nobody here anymore advises the
    use of tables for anything except laying out tabular data (except if the
    design simply can not be achieved with CSS, of which yours is not one:
    http://users.bigpond.net.au/rf/layout.html ).

    > Kindly go and screw yourself.


    Hmmm. This is not unnecessarily rude?

    > Have a nice day :)


    Thank you sir. I await your next question :)

    BTY learn how to post. It's in the FAQ.

    Cheers
    Richard.
    >
    > "Karl Groves" <> wrote in message
    > news:c9m5qk$p9k$...
    > >
    > > "quietman" <> wrote in message
    > > news:c9m5or$822$...
    > > > For those with a similar problem, the answer was to use a nested

    table.
    > >
    > > Please do not give any more advice on usenet (or anywhere else)

    regarding
    > > HTML
    > >
    > > -Karl
    > >
    > >

    >
    >
     
    rf, Jun 3, 2004
    #9
  10. quietman

    Mark Parnell Guest

    On Thu, 3 Jun 2004 13:44:12 +1000, quietman
    <> declared in alt.html:

    > You sir, are unnecessarily rude and a buffoon.


    Karl may be rude, but he's certainly not a buffoon. Not when it comes to
    HTML, anyway. Can't speak for the rest of the time. :)

    Tables are for tabular data. Hence the name. It is extremely rare to
    need to nest tables. The content in the code you posted certainly isn't
    tabular data, therefore no table is necessary. See the link in my
    previous post.

    In addition to that, your code contains various other errors which may
    or may not get interpreted the way you intend by your visitors browsers.

    BTW: Please don't post upside-down
    http://www.allmyfaqs.com/faq.pl?How_to_post

    This will help:
    http://home.in.tum.de/~jain/software/oe-quotefix/

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Jun 3, 2004
    #10
  11. quietman

    quietman Guest

    > Karl may be rude, but he's certainly not a buffoon. Not when it comes to
    > HTML, anyway. Can't speak for the rest of the time. :)


    Semantics. One goes hand in hand with the other in my book. Look at the
    undertones of the majority of his posts. Perhaps 'a pompous ass' would have
    been more fitting? Regardless of his intentions, last I looked, common
    curtesy cost nothing.

    >your code contains various other errors which may
    > or may not get interpreted the way you intend by your visitors browsers.


    Indeed and a very quick 'hack' of the solution, but served the purpose for
    which it was intended. My situation was very much more involved and
    contained more data, images, javascript and mouseover images. The 'solution'
    worked perfectly. 'Code' as you call it, is perfectly interpreted by the 4
    browsers installed on my PC.

    Cheers.
     
    quietman, Jun 3, 2004
    #11
  12. quietman

    Mark Parnell Guest

    On Thu, 3 Jun 2004 15:07:58 +1000, quietman
    <> declared in alt.html:

    > 'Code' as you call it, is perfectly interpreted by the 4
    > browsers installed on my PC.


    Well, as long as your visitors use your computer, you'll be fine.

    HAND

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Jun 3, 2004
    #12
  13. quietman

    quietman Guest

    > HAND

    Job?
     
    quietman, Jun 3, 2004
    #13
  14. quietman

    rf Guest

    "Mark Parnell" <> wrote in message
    news:...
    > On Thu, 3 Jun 2004 15:07:58 +1000, quietman
    > <> declared in alt.html:
    >
    > > 'Code' as you call it, is perfectly interpreted by the 4
    > > browsers installed on my PC.

    >
    > Well, as long as your visitors use your computer, you'll be fine.


    Should not "it works on my computer" be wrapped with <aol> and </aol> tags?

    Cheers
    Richard.
     
    rf, Jun 3, 2004
    #14
  15. quietman

    quietman Guest

    > Should not "it works on my computer" be wrapped with <aol> and </aol>
    tags?


    Either that or <where else could I have a browser installed? Your
    place?>and</where else could I have a browser installed? Your place?>

    It is to laugh, is it not?
     
    quietman, Jun 3, 2004
    #15
  16. quietman

    Mark Parnell Guest

    Mark Parnell, Jun 3, 2004
    #16
  17. quietman

    quietman Guest

    quietman, Jun 3, 2004
    #17
  18. quietman

    Mabden Guest

    "quietman" <> wrote in message
    news:c9mjb0$dh0$...
    > Mark Parnell wrote:
    > > On Thu, 3 Jun 2004 15:53:36 +1000, quietman
    > > <> declared in alt.html:
    > >
    > >>> HAND
    > >>
    > >> Job?

    > >
    > > Have A Nice Day
    > >
    > > http://www.utdallas.edu/ir/tcs/techsupp/acronyms.htm#H

    >
    > OIC. You were using L33t speak? My bad. Wazzup ?


    LOL, ROFLMAO! WTF.. you think "HAND" is L33t! IMHO, U r n00b.

    --
    Mabden
     
    Mabden, Jun 3, 2004
    #18
  19. quietman

    quietman Guest

    Mabden wrote:
    >> OIC. You were using L33t speak? My bad. Wazzup ?

    >
    > LOL, ROFLMAO! WTF.. you think "HAND" is L33t! IMHO, U r n00b.


    Errr...no. I was using sarcasm.

    Now be a good boy and go back to sleep.
     
    quietman, Jun 3, 2004
    #19
  20. quietman

    Mabden Guest

    "quietman" <> wrote in message
    news:c9ml3j$e8p$...
    > Mabden wrote:
    > >> OIC. You were using L33t speak? My bad. Wazzup ?

    > >
    > > LOL, ROFLMAO! WTF.. you think "HAND" is L33t! IMHO, U r n00b.

    >
    > Errr...no. I was using sarcasm.
    >
    > Now be a good boy and go back to sleep.
    >


    Awww, Mom...
     
    Mabden, Jun 3, 2004
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian

    Stupid table cell height

    Brian, Apr 7, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    368
    Brian
    Apr 7, 2004
  2. Replies:
    0
    Views:
    586
  3. JC

    textbox height = containing cell height - x

    JC, Jul 29, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    206
    DujHoD
    Aug 2, 2004
  4. john T
    Replies:
    7
    Views:
    249
    Richard Formby
    Feb 19, 2004
  5. Replies:
    2
    Views:
    266
    Thomas 'PointedEars' Lahn
    Aug 5, 2008
Loading...

Share This Page