[RESOLVED] Controlling image location in new window
I'm building a small art site that will use thumbnails of the works being displayed. Some of the thumbnails are clickable, to produce a larger image in a new window.
The current code for each image is:
<a href="images/MyImage1.jpg"><img style="border: 0px solid ; width: 200px; height: 100px;"
alt="MyImage1 Title" src="images/MyImage1.jpg" /></a>
This produces the thumbnail at 200 x 100 px, as requested. Clicking it produces a new full-size window containing the full sized image; however the window's appearance is browser dependent. In IE11 and Chrome the full-sized image appears at the top left of the new window while in FF it appears central in the window against a black background. Because of the nature of the images the latter is strongly preferable. I'd like to be able to force this appearance independent of the user's browser.
Obviously my code is too simplistic; however I've not uncovered any way to control the new window. Could someone please point me in the right direction?
That's because ALL you are doing is sending the image -- generally what you are describing is the PREFERRED behavior as it lets the user use the browsers natural controls for image handling; you want to style it yourself, you should be sending the image INSIDE a page. Instead of the href on the anchor pointing directly at the image, you point it at a HTML page containing the image.
Which I personally wouldn't do or worry about, but that's because pages that do that usually just piss me off in a "for *** sake just let me open the image" kind of way.
Thanks Deathshadow. Obvious when you think about it. I'd been looking for a solution in the wrong place. Problem solved.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread