how to center a photo, back to...

User 2176507 Photo


Registered User
214 posts

<a href="http://www.example.com/image2.JPG">
<img src="http://www.example.com/image1.JPG">
</a>

I have the above code working but I would like when a customer clicks on image1 -- image2 will open in the center of the page (not using css but something like <center></center> or align="middle"). Also, I would like for a (Back to Previous Page) button to show when image2 opens and I would also like to be able to have some text. So basically when image2 opens I would like the customer to see the photo centered, a "Back to Previous Page" button, and some text. Can someone help me with the code to make all this work together?

<INPUT TYPE="button" VALUE="Back to Previous Page" onClick="history.go(-1);">

Thanks in advance for any help,
yeto
User 364143 Photo


Guest
5,410 posts

You can't center an image using the image file in the link, you have to put the image in an html page centered and link to the page instead of the image. Then you can put the back link on the page and don't have to get all fancy. :)
CoffeeCup... Yeah, they are the best!
User 2176507 Photo


Registered User
214 posts

I was afraid of that. Thanks for taking the time to help.

Kind regards,
yeto

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.