PDA

View Full Version : hiding part of a iframe


chriskq
03-26-2007, 11:27 AM
this is for the css gurus out there if u could lend me a hand.
http://redro.com.au/TEST/stockTest.php

check our the above, you will realise i want the top part of the yahoo stock ifram. ive wrapped it up in a few divs.

im exhausted. tired everything i kno really

domedia
03-26-2007, 03:19 PM
I did this once.. had to hide part of a google page that was iframed into a kiosk.

-Insert a div right under the iframe
-use a negative margin top to move the div where the yahoo logo is
-put a height and width on the div to match the logo you want to hide
-use a high z-index to place the div above the iframe
-For whatever reason I always seem to have to add position: relative to get anything to work in IE (hasLayout)
-Put whatever you want into the div to hide the logo

chriskq
03-27-2007, 01:37 AM
wow good advice dom. ill try this when i get home 2nit
Cheers

chriskq
03-27-2007, 05:46 AM
in fact - great (not good) advice Dom.
got it working in FF sweet as....
http://redro.com.au/TEST/stockTest.php

IE lil bit trickier... althou now i have figured out a way to display the stock text in real time (pulling data from a finance yahoo cvs file)... so prolly wont go with this option.

but ur help was awesome i must say

domedia
03-27-2007, 03:14 PM
I big concern I have with doing it this way, is that I can never be sure the framed content will not change. So one day the provider of that data will change the layout, and my 'hiding div' will be in the wrong spot. And I might not notice it after a week.