Home › Forums › WoodMart support forum › bug iframe css
bug iframe css
- This topic has 4 replies, 2 voices, and was last updated 1 year, 5 months ago by
Luke Nielsen.
-
AuthorPosts
-
September 19, 2023 at 4:57 pm #497454
staffcreatorParticipantHello lads!
I have a JS script placed on a page.
The iFrame doesn’t seem to scale well.
The basic code of the css content is with the value of max-width: 100%;
While if imposed:
width: 100%; works well.The problem comes from the height. in this case unfortunately even setting the value height: 100% does not work.
Obviously you need 100% parameters so that it will also have to adapt to mobile devices.
If instead I enter height: 1000px in this way it seems to work… but it’s not good because the height must be adjusted automatically. I have already set the speed to Auto but nothing is working.
can you check?
I leave the page in question and the related accesses to the site privately.
Attached are the screenshots of my problem.
Thanks, I’ll wait for you here
Greetings
September 19, 2023 at 4:59 pm #497455
staffcreatorParticipantSorry, I forgot the attachments..
Attachments:
You must be logged in to view attached files.September 20, 2023 at 2:53 pm #497748
Luke NielsenKeymasterHello,
iFrame is not something that can be inserted into a page and it will immediately look normal as a paragraph or a picture. For example, some plugin uses iframe, it most often already has some special styles for each corresponding iframe using its scripts or its custom styles (such as YouTube player or Google\open street maps).
Our theme does not use iframes anywhere, and accordingly, there are no special global styles for iframes except
max-width: 100%
, which was set in the basic styles in order to minimize moments when the iframe will be wider than the display window, thereby creating a horizontal scroll.If
max-width: 100%
bothers you, you can remove it using the below custom:iframe { max-width: unset; }
Globally, in the theme, we will not add any height or width styles to the iframe, because this may affect the work of plugins or embedded players and cart.
It follows that each individual type of iframe needs to be styled separately from the others depending on its purpose. If you need to stretch it to the entire screen, it needs to do the following:
1. Give a unique class to the element (for example “custom-iframe”) that contains the iframe so that its new styles do not affect other iframes https://prnt.sc/WJDocfP_dYqD
2. Add the following custom code to stretch this iframe to the entire screen:
.custom-iframe iframe { width: 100%; height: 100vh; }
Kind Regards
September 21, 2023 at 10:39 am #497934
staffcreatorParticipantOk My Friends!!!
Very Good!!Tanks!!!!
🙂September 21, 2023 at 11:17 am #497945
Luke NielsenKeymasterHello,
You are welcome! In case you need any additional help, I’d be more than happy to assist you.
Have a good day!
Kind Regards
-
AuthorPosts
The topic ‘bug iframe css’ is closed to new replies.
- You must be logged in to create new topics. Login / Register