Results 1 to 13 of 13

Thread: Unwanted Table / Select Resizing

  1. #1

    Thread Starter
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032

    Unwanted Table / Select Resizing

    For IE 5 +:

    In a table, I have a form with a select / option tag in it. The options are initially populated from a DB of training course titles. The select tag sizes itself to the longest title in the list, and thus the table sizes it self respectively. Since I initially grab all values from the DB, the table starts out at the maximum size. However, the user is allowed to filter the title lists (which I do thru client side javascript). When they change the list, the select tag again resizes, and so does the table. This resizing is visible to the user. Is there a way for me to keep the table from shrinking (keep the initial max width), without having to hard code a width to the table?

    Thanks.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  2. #2

    Thread Starter
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Bump...
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  3. #3
    scoutt
    Guest
    are yo keeping the table at a certain width or using %'s

  4. #4

    Thread Starter
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Neither. I want the browser to render it as it sees fit.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  5. #5
    scoutt
    Guest
    actaully that isn't good coding, and it will take longer for the browser to load it up if thre is not size tags. but you won't notice the difference, they just say that. if you don't tell it a size you can't conrtol it as you want.

  6. #6

    Thread Starter
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    But I want the table to be the max size of elements plus their padding, and then stay that way. I have no way of knowing what the size should be ahead of time.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  7. #7
    scoutt
    Guest
    but if you want to keep the max size then you will have to use the width tag.

  8. #8

    Thread Starter
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Okay, but what if I set the width to 600. Then later the user decides to put a 2000 letter course title into the database, which would show up as an option tag in the select list. The table is going to stretch to the width of the select tag anyway, which will leave me with the same problem.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  9. #9
    scoutt
    Guest
    sounds like it, so just make the table the size you want, say 100% or 600 then make the <td> tag say 100%. if you have a option in there that is that long I would think of a way to make it smaller. but that is my opinion. other than that I don 't know of any other way, sorry.

    I thought once you set a limit to the width of the table it won't go any bigger than that, but it suonds like the select tag is overriding that.

  10. #10

    Thread Starter
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Yeah, the select tag is forcing the width.

    Thanks for your insight. I think I'm gonna just leave it alone unless the users complain.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  11. #11
    scoutt
    Guest
    well that is a big option if it takes up the whole screen. I just ran a test and did an option that would take the table past the 600 width and it did make it about 800. well that is one long arse choice. would you ever get one that big? it was about over 150 charactors, that is big

  12. #12

    Thread Starter
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Well right now the DB limits the field to 100 characters (varchar(100)), but that wouldn't stop the users from asking me to make it bigger down the road if they needed it...
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  13. #13
    scoutt
    Guest
    I would either hard code it to 600 or what ever and then leave it as you might not get that big, until they ask you. or like you said just leave it as is until somebody complained. :P

Posting Permissions

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



Click Here to Expand Forum to Full Width