Results 1 to 7 of 7

Thread: Silly HTML question, help me out?

  1. #1

    Thread Starter
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547

    Silly HTML question, help me out?

    Ok, this may sound easy but I'm drawig a blank.

    I have a HTML that resizes depending on the users resolution.
    Now, there is a table in there that needs to be a certain width. But, not just any width.

    Code:
    <TABLE WIDTH="EQUAL OR GREATER THEN X">
    <TABLE>
    What I mean by "EQUAL OR GREATER THEN X" is:
    X is the MINIMUM size my table has to be. BUT, if possible make it full size of the window. Heres another example

    If I used
    Code:
    <TABLE WIDTH="100%">
    </TABLE>
    That would make my table tiny if the user shrunk the browser to just a single line, right?

    BUT, what I need it to do instead is... if the browser size is less then X, stop shrinking the table. I can't use the following code either.

    Code:
    <TABLE WIDTH=X>
    </TABLE>
    This would make my table a constant size, which I don't want. I need it to size to the window if browser is bigger then X.
    What I was thinking was

    Code:
    <TABLE WIDTH="100%">
    <TR WIDTH=X>
    </TABLE>
    I was hoping I could make a row width X, therefore, when the table got smaller then TR, it would stop.. because TR needs that space. This does not work, any suggestions?
    ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet?

  2. #2
    Hyperactive Member Radames's Avatar
    Join Date
    Feb 2001
    Location
    Tech Tropics
    Posts
    360
    I know there is JavaScript code that can detect resolution. Try some if-then-redirect statements and have different webpages for different resolutions.
    Top Tip: You can make friends and impress the opposite sex at geeky cocktail parties by saying "DB" instead of database. - Karl Moore

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    screen.width and screen.height will get you the resolution, depending upon that, you may redirect.

  4. #4

    Thread Starter
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547
    I know how to get the resolution... X is the resolution - a few pixels. I think you guys misunderstood.. what I need to do is make the table X size or greater. If the Browser is shrunk, (when not full screen) then I need it to stop at X, since X wont always be the full size of the monitor.
    ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet?

  5. #5
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Make a 1x1 gif that is transparent, call it blank.gif.
    Now, use this as the 'spacer':
    Code:
    <TABLE WIDTH=100%>
    <TR><TD><IMG WIDTH=X HEIGHT=1px SRC=blank.gif></TD></TR>
    </TABLE>
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  6. #6
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    You can also use CSS's min-width:

    Code:
      <td style="min-width:50px;">
    But I think IE has problems. I would probably use margin or padding over a transparent image too:

    Code:
      <td style="padding:50px;">

  7. #7

    Thread Starter
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547
    Thatnks guys, im going to try that right now.
    ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet?

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