i have an i frame on my page and when a button is clicked it loads the title for that page into the iframe. the problem i am having is when the image is loaded into the iframe it reduces the size of the image. how can i get it to display the image without changing the size of it the code i have used looks like this

<iframe name="ifrm" id="ifrm2" src="images/home_title.jpg" scrolling="no" allowtransparency="true" ></iframe>

Wouldn't be that because you disabled scrolling? Did you try to set it as auto?

as it was only a couple of images i got round it by just creating a web page wih a one cell table on it and displaying the image in there. then with the iframe i just called the web page holding the image and it displayed it fine.

probably another way to do it but it only took me a couple of minutes to create the pages i needed thanks for the reply though.

explanation of how i worked through the problem:

my problem was i needed to display an image inside an iframe, when the image was displayed in the iframe using the img tag the image was resized and was barely visible.

solution

create a web page which has a one cell table the same size as the image you need displaying. insert the image into the table cell with the image tag. save this page with what ever name you like.

on the page where you want the image to be displayed in the iframe, instead of calling the image directly into the iframe call the page you have created with the image in the table.

set the ifame to be slightly bigger than the table cell and set the scrolling to no.

the image should now be displayed in the iframe keeping all its original attributes.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.