The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> size of an iframe in Wordpress
Eggbird
post Sep 18 2021, 11:57 AM
Post #1





Group: Members
Posts: 3
Joined: 18-September 21
Member No.: 28,098



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/
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 18 2021, 12:52 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Sep 18 2021, 01:24 PM
Post #3


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Eggbird
post Sep 19 2021, 06:52 AM
Post #4





Group: Members
Posts: 3
Joined: 18-September 21
Member No.: 28,098



Thank you for your input, give me leads to repair the page ...... Thanks !
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th March 2024 - 02:34 AM