www.webdeveloper.com
Results 1 to 2 of 2

Thread: iframe is not working in blogger blog

  1. #1
    Join Date
    Dec 2012
    Posts
    1

    iframe is not working in blogger blog

    Hi i am using iframe full height in my blogger blog.

    Used CSS is:

    Code:
    #iframe {
       height: 100%; 
       width: 100%; 
       display: block;
       border:0;
       margin:0;
       padding:0;
    }
    and Javascript is:

    Code:
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
    <script>
        var height = window.innerHeight;
    
        $(document).ready( function(){
           $('iframe').css('height', height);
        } );
    </script>
    and HTML is:

    Code:
    <iframe id="iframe" src="http://mybloggertricks.com"></iframe>
    I had tested this in Dreamviewer with the same above attributes it's working fine in IE also. But only in blogger it's not working in only IE browser. Please help me anybody on this problem Please Help.

    see that blog here:
    http://new-temp.blogspot.com/2012/12...er-tricks.html

  2. #2
    Join Date
    Nov 2010
    Posts
    1,049
    I can't see the difference, but you should know that .innerHeight is not understood by IE<9. There are workarounds, but being that you are using jQuery anyway you can use the jQuery method (and also put it inside your document. ready function just to be sure:

    Code:
    $(document).ready( function(){
    var height=$(window).height();
           $('iframe').css('height', height);
        } );

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles