Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Web Site Functionality _ size of an iframe in Wordpress

Posted by: Eggbird Sep 18 2021, 11:57 AM

When a make a single page with text or images the white background canvas adjust to the space needed. When I make a single page with an iframe it is not…. The canvas shrinks to it minimum. The horizontal size of the iframe is oke. The vertical size is zero. Also when I give the iframe a height like <iframe … height=”1600px” >. What can I do ?

See: The link of the page is : https://chaturanga.nl/index.php/sevilla/

Posted by: pandy Sep 18 2021, 12:52 PM

It's the height: 100% you have in the inline CSS. Your 1600px is in a HTML attribute and CSS will override HTML even if the latter comes later. Change to CSS and it'll work, as long as it comes later than the 100%. But so will simply removing the 100%.

100% doesn't mean 100% of the page's height. The percentage is relative the height of the iframe's containing block. It's a little complicated...
http://www.w3.org/TR/CSS21/visudet.html#propdef-height

If you want the iframe to be a certain height you are probably better off with a fixed height. I'd use em rather than pixels so it's relates to the text size. You can do it with trial and error and find the right number to show as many rows as you want visible.

Posted by: Brian Chandler Sep 18 2021, 01:24 PM

There's vw and vh, which are percentages of the "viewport" in width and height directions. (Unless I got the letters wrong...) But like most bits of CSS that came later they seem to be better thought out than the incoherent earlier bits.

Posted by: Eggbird Sep 19 2021, 06:52 AM

Thank you for your input, give me leads to repair the page ...... Thanks !

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)