iFrame with specific portion of website

Question : I give a sample, lets say yahoo! main page size is 1000 x 800 , i just want to make an iframe in my website which only size 300×200 and it’s only shows yahoo “featured,entertainment,sports, life” box without any scrolling.

Answer : The id of the box containing the four tabs is <ul id=”todaytabs”>, so you can target that section with the src of the iframe being http://www.yahoo.com/#todaytabs

The code is:
<iframe src=”http://www.yahoo.com/#todaytabs” width=”431″ height=”263″ frameborder=”0″ scrolling=”no”></iframe>

In my sample I went a little higher up in the DOM (targeting the ‘today’ id) and gave it a little more height so i could get the borders in. My code is:

<iframe src=”http://www.yahoo.com/#today” width=”431″ height=”267″ frameborder=”0″ scrolling=”no”></iframe>

Sample URL :  http://www.evotech.net/answers/iframe.html

This entry was posted on Thursday, February 28th, 2008 at 4:24 am and is filed under Tips For WorldWideWeb. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply