Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    m__
    m__ is offline
    New Coder
    Join Date
    Jan 2003
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Restrict table height / Prevent cell auto-expand

    Preface:
    - I've (quickly) searched the forum, but cannot find an answer to my question.
    - Yes, I'm using tables for layout purposes. I'm not looking for a dissertation on why this is bad. I'll stop using tables for layout purposes when vBulletin stops.

    Question:
    Is there a way to restrict a table cell's height other than the height attribute (which doesn't seem to work in IE)?

    In other words:
    How can I prevent a table from auto-expanding to fill space?

  • #2
    m__
    m__ is offline
    New Coder
    Join Date
    Jan 2003
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Forget it. I've resorted to about a million embedded tables. It sucks, but it kind of works.

    Here's an article which describes the problem more accurately than I have, if anyone is interested:

    http://builder.cnet.com/webbuilding/...tml/ss01c.html

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This doesn't work in IE, but you can restrict dimensions with CSS:

    element { max-width:100px; max-height:100px; }

    Can't remember what happens to content which is too large and can't be compressed - I think it hangs over the edge.

    Alternatively, you have overflow and clip, which does work in IE as well:

    element { overflow:hidden; clip:rect(0,100px,100px,0); }

    For overflow you can specify "hidden" or "scroll" (or "visible", but that's the same as default)
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    paris, france
    Posts
    1,216
    Thanks
    0
    Thanked 0 Times in 0 Posts
    well alteritaly you could have a <textarea> in your cell with invisible borders. a bit extreme though
    photoshop too expensive? use the GIMP! www.gimp.org


  •  

    Posting Permissions

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