PDA

View Full Version : Iframe Width



atrain
02-09-2009, 01:15 AM
1) Script Title:
Tab Content Script
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm
3) Describe problem:
I am using the shade tabs style (the first example) and I am using iframes for each tab. my problem is when you click the tab, the iframe width is really small and I can't figure out how to make it wider.
If you want to see what I mean I am using it on http://www.news.newatrain.com/

ddadmin
02-10-2009, 08:34 PM
By default the width of the IFRAME expands to that of the DIV containing it. If that DIV is narrow (check the CSS), so will the IFRAME. You can tweak the attributes that get added to the IFRAME by editing the below inside the .js file:


this.defaultIframe='<iframe src="about:blank" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" class="tabcontentiframe" style="width:100%; height:auto; min-height: 100px"></iframe>'

BTW, please note that your page is currently in violation of our usage terms, since the credit notice doesn't appear inline on the page. Please reinstate the credit notice: http://www.dynamicdrive.com/notice.htm

atrain
02-12-2009, 12:56 AM
whooops, its on all but that page. That's my bad