Screen width and height

Hello,

Recently I’ve been trying to make an image size more less similar to the visitor’s screen resolution.

I used the internet, took a script and attached this script code into my file:

I got the message, everything is okay. But the problem is that I want to put those numbers into the html code inside width and height. I can’t put that script inside quotas and I can’t attach those numbers to the php code. Or can I? I’ve tried but couldn’t do it. This must be a very simple question for some of you and I really hope to get some fast help. Thanks for reading this!

If you just want to have an image fit the screen resolution, then couldn’t you 1) detect the resolution (there are tutorials online for this) 2) resize the image based on that 3) display resized image. You should be able to code all of this into your page and have it done on the client end.

I’m not sure why you need to tell the user what his/her resolution is, or what that has to do with getting an image to fit…

More explanation might help.

Sponsor our Newsletter | Privacy Policy | Terms of Service