100% AND fixed size table?

Discussion in 'CSS' started by abcdefGARY, Nov 3, 2006.

  1. #1
    hello, on some websites, I've seen that they use like 100% tables, which fill the whole screen yet I minimize the width of the window, the tables will automatically stop resizing at a fixed size.

    right now, when my tables are at 100%, they fill the whole screen, but if i was to minimize the window, the contents would be squished together.

    how do I go about making a table that has a size of 100% yet will stop 100%'ing when the browser window is smaller than say... 500px.

    I hope you guys understand what I'm trying to ask. if not, I can show you an example from a website.

    thanks in advance
     
    abcdefGARY, Nov 3, 2006 IP
  2. Silver89

    Silver89 Notable Member

    Messages:
    2,243
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    205
    #2
    You could put a table within that table with a set 500px?

    If what you want is the same as the effect on funzac.. http://funzac.com/ then this might help ..

    set both the margins on auto?

    margin-right:auto;
    margin-left:auto;

    and the size of the table the smallest you want it?
     
    Silver89, Nov 4, 2006 IP
  3. abcdefGARY

    abcdefGARY Well-Known Member

    Messages:
    665
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #3
    at the top, they have their banner, which is 100% when I have my browser window maximized. however, when I squeeze the width of the window, it doesn't stay 100%, it goes to the size of that table.

    i would like to know how to do this.
     
    abcdefGARY, Nov 4, 2006 IP
  4. jascele

    jascele Peon

    Messages:
    48
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It's the images at the top of the page that stop it from going any smaller. The site you listed has two images at the top. Once they hit, that's all the further the screen can go. You can't "squish" an image.
     
    jascele, Nov 4, 2006 IP
  5. abcdefGARY

    abcdefGARY Well-Known Member

    Messages:
    665
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #5
    when you minimize the width of the browser, the tables will stop "squeezing" after it reaches the fixed size.
     
    abcdefGARY, Nov 4, 2006 IP
  6. jascele

    jascele Peon

    Messages:
    48
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #6
    They don't have anything specific in there keeping it from going too small. Just a combination of the input box, images and google ads.
     
    jascele, Nov 4, 2006 IP
  7. jascele

    jascele Peon

    Messages:
    48
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You could try this. Should keep it from getting too small even without images or anything else.

    width: 100%;
    min-width: 800px;
     
    jascele, Nov 4, 2006 IP
  8. abcdefGARY

    abcdefGARY Well-Known Member

    Messages:
    665
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #8
    I think this is the only way, I was hoping there was a solution with CSS or what.

    sorry, this doesn't work...

    oh, well. I used the table within table solution. until someone can find a better way. :rolleyes:
     
    abcdefGARY, Nov 4, 2006 IP
  9. jascele

    jascele Peon

    Messages:
    48
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I didn't realize when I posted that it doesn't work with IE. Should work with Firefox, but you're probably better off with the second table/div/whatever that is a fixed width so it will work in all browsers.
     
    jascele, Nov 5, 2006 IP
  10. Forcefield

    Forcefield Peon

    Messages:
    314
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0