trifecta2k
asked on
Picture resizing with browser
All I want to do is make it so that this picture is the as big as the browser. No bigger and no smaller. When the user shrinks the browser the picture should shrink. Here is my code:
<body bgcolor="#c0c0c0" style="margin:0px;">
<img src="images/beach-pictures .jpg" align="middle" width="100%" height="100%" />
</body>
It works perfectly when I view it with my Mac, but when its viewed on a PC it picture is larger than the screen so the user has to scroll down. Then if the user shrinks his browser the picture stays the same size and does not shrink with the browser.
All I want to do is create a page with one picture and nothing else. No borders, no text, nothing else. Please help. I know this is easy but i need this to work asap. THanks again.
<body bgcolor="#c0c0c0" style="margin:0px;">
<img src="images/beach-pictures
</body>
It works perfectly when I view it with my Mac, but when its viewed on a PC it picture is larger than the screen so the user has to scroll down. Then if the user shrinks his browser the picture stays the same size and does not shrink with the browser.
All I want to do is create a page with one picture and nothing else. No borders, no text, nothing else. Please help. I know this is easy but i need this to work asap. THanks again.
ASKER
I'm getting a syntax error. Everything you have in the <head> shows up as text in IE.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks. It works great!
Try this;
<html>
<head>
* {padding:0;margin:0;}
html, body, img {height:100%;width:100%;}
</head>
<body>
<img src="images/beach-pictures
</body>
</html>
Regards,
Steggs