Asked  7 Months ago    Answers:  5   Viewed   28 times

Is iframe height=100% supported in all browsers?

I am using doctype as:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

In my iframe code, if I say:

<iframe src="xyz.pdf" width="100%" height="100%" />

I mean will it actually take the height of the remaining page (as there is another frame on top with fixed height of 50px) Is this supported in all major browsers (IE/Firefox/Safari) ?

Also regarding scrollbars, even though I say scrolling="no", I can see disabled scrollbars in Firefox...How do I completely hide scrollbars and set the iframe height automatically?

 Answers

74

You could use frameset as the previous answer states but if you are insistent on using iFrames, the 2 following examples should work:

<body style="margin:0px;padding:0px;overflow:hidden">
    <iframe src="http://www.youraddress.com" frameborder="0" style="overflow:hidden;height:100%;width:100%" height="100%" width="100%"></iframe>
</body>

An alternative:

<body style="margin:0px;padding:0px;overflow:hidden">
    <iframe src="http://www.youraddress.com" frameborder="0" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;height:100%;width:100%;position:absolute;top:0px;left:0px;right:0px;bottom:0px" height="100%" width="100%"></iframe>
</body>

To hide scrolling with 2 alternatives as shown above:

<body style="margin:0px;padding:0px;overflow:hidden">
    <iframe src="http://www.youraddress.com" frameborder="0" style="overflow:hidden;height:150%;width:150%" height="150%" width="150%"></iframe>
</body>

Hack with the second example:

<body style="margin:0px;padding:0px;overflow:hidden">
    <iframe src="http://www.youraddress.com" frameborder="0" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;height:150%;width:150%;position:absolute;top:0px;left:0px;right:0px;bottom:0px" height="150%" width="150%"></iframe>
</body>

To hide the scroll-bars of the iFrame, the parent is made overflow: hidden to hide scrollbars and the iFrame is made to go upto 150% width and height which forces the scroll-bars outside the page and since the body doesn't have scroll-bars one may not expect the iframe to be exceeding the bounds of the page. This hides the scrollbars of the iFrame with full width!

Tuesday, June 1, 2021
 
Amber
answered 7 Months ago
23

The body has a default margin in most browsers. Try:

body {
    margin: 0;
}

in the page with the iframe.

Wednesday, June 2, 2021
 
madphp
answered 7 Months ago
73

this gives you the two rows from your example:

SELECT  *
FROM    ft
WHERE   MATCH(value) AGAINST ('"levi's" lacost*' IN BOOLEAN MODE)

In http://dev.mysql.com/doc/refman/5.5/en/fulltext-boolean.html at the end, it talks about exact matches in double quotes. You then just escape the single quote and you are done.

Using parentheses, you can add the asterisk:

WHERE   MATCH(value) AGAINST ('(levi's)* lacost*' IN BOOLEAN MODE)
Friday, August 6, 2021
 
juanrpozo
answered 4 Months ago
15

You didn't say anything about file types so I used HTML-5 formats that work in Safari.

<!DOCTYPE>
    <meta charset="UTF-8">
    <title> audio video</title>

    <audio id="audioInHTML" controls="controls">     
    <source src="audio.wav" type="audio/wav"/>
    </audio>
    </div>

    <video id="videoInHTML" width="320" height="240" controls="controls">
      <source src="movie.mp4" type="video/mp4" />
    </video>

    <div id="playButtonDiv" </div>

    <form>
    <input type="button" value="PlaySoundAndVideo" onClick="PlaySoundAndVideo('videoInHTML'),PlaySoundAndVideo('audioInHTML')">

    </div>

    <script>

    function PlaySoundAndVideo(soundObj,videoObj) {
    var soundAndVideo=document.getElementById(soundObj,videoObj);
    soundAndVideo.play();
    }


    </script>

    <style type="text/css">


    #playButtonDiv {
    position:absolute;
    top:800px;

    };   

    </style>
Sunday, August 15, 2021
 
aorfevre
answered 4 Months ago
89

Hopefully, I've found a good blog post and download link for this Pure HTML5/JS/CSS3 project template. I've spent a lot of time today, searching a solution how to start a pure project without useless things which I never use in future. Finally, I found download link for purehtml (codepen official link is no longer exist) in article

Update 17-Mar-15:

Uploaded it to the dropbox, because previous link is stopped working

Monday, November 8, 2021
 
Koden
answered 1 Month ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :
 
Share