Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Yup, sure, just add the following near the top of your page,

Code:
To see this page sideways close your eyes tilt your head 90 degrees to the right or left, then open your eyes.

HTML doesn't have these capabilities. You could potentially do it with a flash page, but don't really see why anyone would want to do this as it would be a horrible user experience. If you wanted to rotate an image you would need two different image files showing the different rotations, and then you'd use JavaScript to switch out the files.
 
Yup, sure, just add the following near the top of your page,

Code:
To see this page sideways close your eyes tilt your head 90 degrees to the right or left, then open your eyes.

HTML doesn't have these capabilities. You could potentially do it with a flash page, but don't really see why anyone would want to do this as it would be a horrible user experience. If you wanted to rotate an image you would need two different image files showing the different rotations, and then you'd use JavaScript to switch out the files.

Umm... I don't think that's what the poster means.

I take it that he has a couple of different images, and when someone clicks refresh, he wants an image to randomly appear.
 
Also, instead of an image, can I randomly rotate an entire page? Thanks!


Hello Macaddict23,

This is a simple way to rotate an image on refresh or page load.

PHP:
<img src="<? echo rand(1, 10); ?>.gif" height="THE HEIGHT" width="THE WIDTH" border="0"/>

This method uses PHP so you will need PHP on your server, however most linux servers have PHP installed by default.

The explanation of the code:

<? - This open a PHP session.
echo - This is a way to output something in PHP
rand(1, 10) - This is a random function in PHP. In this case I assumed you had 10 images that you wanted to possibly output. If you had 4 images your random function would look like this rand(1, 4).
?> - This closes the PHP sesstion.
.gif - You image format. This can be any file extension.

If you have a question on need clarifications please let me know.

Jambla
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.