I'm creating a webpage for a project, and I'm trying to create a gallery where you select an image on a left frame, and have the original image open in the right frame. Every time I click on the image, it opens in the right frame, but it's oversized. What I want to do is have the image fit to the width of the frame, but I haven't figured out a way to do that since I don't have a SRC in the right frame's html file. I've tried doing several things including using iframes to no avail. Any help, please?
Here is my frameset:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Frameset</title>
</head>
<frameset rows="*" cols="50%,50%" framespacing="1" frameborder="yes" border="1" bordercolor="#FFFFFF">
<frame src="gallery_left_frame.html" name="mainFrame" id="mainFrame" title="mainFrame" />
<frame src="gallery_right_frame.html" name="rightFrame" id="rightFrame" title="rightFrame" style="max-width:100%" marginheight="1px"/>
</frameset>
<noframes>Your browser does not support frames. Please upgrade to a newer browser to use this website.</noframes>
</html>
This is my gallery, which is the left frame:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Gallery</title>
</head>
<body>
<div align="center"><a href="Assets/General Construction/FDGC001.jpg" target="rightFrame"><img src="Assets/General Construction/General Construction Small/FDGC001.jpg" width="100%" height="auto" /></a></div>
</body>
</html>
And this the nearly blank html file which is the right frame:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body {
background-color: #000;
}
img {
border: none;
height: 100%;
width: 100%;
}
</style>
</head>
<body>
</body>
</html>