Notices
Results 1 to 9 of 9

Thread: HTML Table-Cell Width Minimum Resizing Limit?

  1. #1 HTML Table-Cell Width Minimum Resizing Limit? 
    Forum Sophomore Nanobrain's Avatar
    Join Date
    Mar 2007
    Location
    Texas, US
    Posts
    150
    I've looked everywhere, but with no luck. I have set the middle cell of a row of my table to stretch across at 100%. It sits between two outer cells which are set at a width of 50 pixels each. Everything works fine, except that I cannot quite figure out how to allow the middle cell a minimum width upon browser resizing. So, for example, I may only wish for it's width to be able to compact as small as 200 pixels. But, stretch out as far as the browser can go.

    Anyone have any suggestions. The code is below.

    Code:
    <html>
    <head>
    <title>Chris Martindale Galleries - Project Manager</title>
    <head>
    <body>
    <table cellpadding=0 cellspacing=0 border=1 width=100%>
    <tr>
    <td width=50px align=center>THIS IS THE LEFTHAND</td>
    <td width=100% align=center>THIS IS THE MID SECTION</td>
    <TD width=50px align=center>THIS IS THE RIGHTHAND</td>
    </tr>
    <tr>
    <td colspan=1 align=left>Link1</td>
    <td colspan=2 align=center>SOME TEXT</td>
    </tr>
    </table>
    
    </body>
    </html>


    Reply With Quote  
     

  2.  
     

  3. #2  
    WYSIWYG Moderator marnixR's Avatar
    Join Date
    Apr 2007
    Location
    Cardiff, Wales
    Posts
    5,760
    how about not setting the width of the middle bit ?

    e.g.

    <td align=center>THIS IS THE MID SECTION</td>

    i assume it would take up the remaining width of the table whatever your screen size


    "Reality is that which, when you stop believing in it, doesn't go away." (Philip K. Dick)
    Reply With Quote  
     

  4. #3  
    Forum Junior
    Join Date
    Jun 2006
    Posts
    264
    for netscaps I'm pretty sure there is a min-width property. But I don't think that works on explorer or firefox But if all else fails you can throw a 200px blank spacer image in the top of your cell.

    What needs to go in this middle cell?
    Reply With Quote  
     

  5. #4  
    WYSIWYG Moderator marnixR's Avatar
    Join Date
    Apr 2007
    Location
    Cardiff, Wales
    Posts
    5,760
    can't believe i forgot about stylesheets :

    this should do the trick :

    <td style="min-width: 200px;">...</td>
    "Reality is that which, when you stop believing in it, doesn't go away." (Philip K. Dick)
    Reply With Quote  
     

  6. #5  
    Forum Junior
    Join Date
    Jun 2006
    Posts
    264
    dont think that works in explorer
    Reply With Quote  
     

  7. #6  
    WYSIWYG Moderator marnixR's Avatar
    Join Date
    Apr 2007
    Location
    Cardiff, Wales
    Posts
    5,760
    trust me - it does (i'm using IE at work)
    "Reality is that which, when you stop believing in it, doesn't go away." (Philip K. Dick)
    Reply With Quote  
     

  8. #7  
    Forum Junior
    Join Date
    Jun 2006
    Posts
    264
    really? great thing to know... thanks
    Reply With Quote  
     

  9. #8  
    WYSIWYG Moderator marnixR's Avatar
    Join Date
    Apr 2007
    Location
    Cardiff, Wales
    Posts
    5,760
    oops, sorry - just tried it out and you're right it doesn't work in IE

    so much for taking my word for it !
    "Reality is that which, when you stop believing in it, doesn't go away." (Philip K. Dick)
    Reply With Quote  
     

  10. #9  
    Forum Junior
    Join Date
    Jun 2006
    Posts
    264
    heh
    Reply With Quote  
     

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