|
-
Nov 8th, 2002, 08:55 PM
#1
Thread Starter
Fanatic Member
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? 
-
Nov 8th, 2002, 11:50 PM
#2
Hyperactive Member
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
-
Nov 9th, 2002, 05:30 AM
#3
screen.width and screen.height will get you the resolution, depending upon that, you may redirect.
-
Nov 9th, 2002, 06:44 AM
#4
Thread Starter
Fanatic Member
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? 
-
Nov 9th, 2002, 10:49 AM
#5
Good Ol' Platypus
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)
-
Nov 9th, 2002, 01:09 PM
#6
Frenzied Member
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;">
-
Nov 11th, 2002, 01:41 AM
#7
Thread Starter
Fanatic Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|