Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

iframe

Status
Not open for further replies.

tswitz00

IS-IT--Management
Jan 26, 2005
67
US
I need to load a page in an iframe, or something similar, where only a part of the source file shows in the frame. I tried marginwidth and marginheight but that only lets me go as far as 0. I need something that will let me show only an image in the middle of the source file and nothing else.
 
Give the image an ID:

Code:
<img id="myImage" src="..." />

and then append that to the source you are loading in the iframe.

For example, if the source was previously "myPage.html":

Code:
<iframe src="myPage.html" ...>

you would add a hash symbol followed by the id:

Code:
<iframe src="myPage.html[!]#myImage[/!]" ...>

Hope this helps,
Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Well not necessarily just an image, just something in the middle of the page, could be a table. Just want to cut out the navigation of the source page and top headers. Sorry guess an image was a bad example.
 
I imagine you are talking about putting the ID on an element within the source file?

I am not able to edit the source file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top