Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
i need a script that changes the size of an image depending on the size of the webpage (kinda like a "width" and "height"). i know i've heard it here before, but they never said where they got it or what it was.
i also need a script to find out what the screen res of the client is and at certain res's i want the website to change accordingly.
thanks to all who contribute!
FBI_Agent
AIM: EliteAssassin187

i dont think so. someone before said that they got a script to do it. i can check it out though
FBI_Agent
AIM: EliteAssassin187

lol, well i just checked it and it worked. well thanks!
anyone got a solution for the second part?
FBI_Agent
AIM: EliteAssassin187

http://jaymc.co.nr/fbi.htm
you can alter the script to do more than just print out the screen size
e.g
echo "<style>body {background:#red} </style>";
have fun

lmao, holy crap! does it seriously have to be this long?
ok, i think i've gotten this figured out.
im a n00b in javascript though, so i might need some advice with this later.
oh, by the way... do you know if people still use 640x480 res? cuz if theres not a lot of those anymore, it would make my websites a LOT better and easier to createFBI_Agent
AIM: EliteAssassin187

/snip
do you know if people still use 640x480
/snipa poll in my country reveals that most people use 800x600... less than 1% use 640x480 and the rest use resolution larger than 800x600...
a poll in an international forum said that most people use 1024x768, none using 800x600...
'a webdev guide' I read (quite outdated though) said that you must create the site mainly for 800x600 and make it still look good on bigger resolution...
:D
and here's a sample of page with stretching background... just view the source and get the css file:
http://azza.webhop.net/indextest.php
basically it uses % as the image width and height, then putting the content in the upper layer... (because we cant set background image's size on css)
^o^

Below are links to two sites that I look at for web use statistics:
http://www.w3schools.com/browsers/browsers_stats.asp
<A
href="http://www.upsdell.com/BrowserNews/stat.htm" style="color:red">http://www.upsdell.com/BrowserNews/stat.htm
For the 12 people left in the world that still use 640x480 (I seem to know 10 of them), I just make sure that scroll bars will come up if needed.
(don't know why my second link isn't displaying properly)

basically anyone that uses a 640 X 480 screen can swivel
p.s, no it doesnt have to be that long (the script) its just that theirs a lot of s--- goin on their to make it do the job required. u cud probs take half of it out for wot yr after.
if u need percific help with it contact me

I had 640x480 up until about a year ago. It seemed pretty obvious that most sites were not designed with me in mind. Now, after purchase of a newer system, I'm on 1024x768, and interestingly, I can see that most sites are STILL not designed for me. Oh well. I guess 800x600 is the way to go after all...

yeah, im using 1024x768 and its like impossible to get a good site for 640x480.
thanks laler and don for the stats on desktop res.
thanks to jamie for the script. i was thinking on having a only like 3...
640x480, 800x600, and 1024x768. i guess not i dont need the 640x480 one. so ill just do a 1280x960 instead.
i dont think there's a lotta people with 1600x1200... maybe someone could tell me the stats for that. (i wouldnt make a site just for them anyway)last but not least, thanks to larry for pointing out that only losers still have 640x480
thanks everyone! lolFBI_Agent
AIM: EliteAssassin187

number 1 rule i always follow when designing a site to cater for all screen sizes....
design the site to fit perfect for 800 * 600
then throw the whole site inside an inner table which is center...
then no matter what size their monitor is, the site will always appear perfectly in the middle.. cant go wrong then

yeah, i was probably gonna do that ;) but ill start that at 1280x960 since i am going to be using that script that you gave me (at least im gonna try)
FBI_Agent
AIM: EliteAssassin187

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |