Results 1 to 3 of 3

Thread: Iframe Width

  1. #1
    Join Date
    Feb 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Iframe Width

    1) Script Title:
    Tab Content Script
    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...tent/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/
    Last edited by ddadmin; 02-10-2009 at 08:29 PM.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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:

    Code:
    	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
    DD Admin

  3. #3
    Join Date
    Feb 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    whooops, its on all but that page. That's my bad

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •