User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 423,760 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,277 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 608 | Replies: 2 | Solved
Reply
Join Date: Feb 2008
Posts: 298
Reputation: kevin wood is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz in Training

loading images into iframes

  #1  
Apr 28th, 2008
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>
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,434
Reputation: peter_budo is a jewel in the rough peter_budo is a jewel in the rough peter_budo is a jewel in the rough peter_budo is a jewel in the rough 
Rep Power: 11
Solved Threads: 295
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: loading images into iframes

  #2  
Apr 29th, 2008
Wouldn't be that because you disabled scrolling? Did you try to set it as auto?
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Reply With Quote  
Join Date: Feb 2008
Posts: 298
Reputation: kevin wood is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz in Training

Re: loading images into iframes

  #3  
Apr 29th, 2008
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.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb HTML and CSS Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 1:54 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC