Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1301609

    Hi,
    how can i make an Iframe stretch to full width?
    It doesnt even stretch full width when putting in a colorsection.

    <iframe src="https://example.org/test/test/" style="border:0px #ffffff none;" name="myiFrame" scrolling="no" frameborder="0" marginheight="0px" marginwidth="0px" height="1080px" width="1920px" allowfullscreen></iframe>

    This is the section:
    `[av_section min_height='' min_height_pc='25' min_height_px='500px' padding='default' margin='' custom_margin='0px' color='main_color' background='bg_color' custom_bg='' background_gradient_color1='' background_gradient_color2='' background_gradient_direction='vertical' src='' attach='scroll' position='top left' repeat='no-repeat' video='' video_ratio='16:9' video_mobile_disabled='' overlay_enable='' overlay_opacity='0.5' overlay_color='' overlay_pattern='' overlay_custom_pattern='' shadow='no-border-styling' bottom_border='no-border-styling' bottom_border_diagonal_color='#333333' bottom_border_diagonal_direction='' bottom_border_style='' scroll_down='' custom_arrow_bg='' av-desktop-hide='' av-medium-hide='' av-small-hide='' av-mini-hide='' id='' custom_class='' template_class='' aria_label='' av_element_hidden_in_editor='0' av_uid='av-449u' sc_version='1.0']
    [av_heading heading='Headline' tag='h2' style='blockquote modern-quote modern-centered' subheading_active='subheading_below' show_icon='' icon='ue800' font='entypo-fontello' size='4vw' av-medium-font-size-title='' av-small-font-size-title='' av-mini-font-size-title='' subheading_size='' av-medium-font-size='' av-small-font-size='' av-mini-font-size='' icon_size='' av-medium-font-size-1='' av-small-font-size-1='' av-mini-font-size-1='' color='' custom_font='' icon_color='' margin='' margin_sync='true' padding='10' icon_padding='10' link='' link_target='' id='' custom_class='' template_class='' av_uid='av-koxeaaox' sc_version='1.0' admin_preview_bg='']
    Komm rein
    [/av_heading]

    [av_textblock size='' av-medium-font-size='' av-small-font-size='' av-mini-font-size='' font_color='' color='' id='' custom_class='' template_class='' av_uid='av-koxechgf' sc_version='1.0' admin_preview_bg='']
    <iframe src=”https://example.org/test/test/&#8221; style=”border:0px #ffffff none;” name=”myiFrame” scrolling=”no” frameborder=”0″ marginheight=”0px” marginwidth=”0px” height=”1080px” width=”1920px” allowfullscreen></iframe>
    [/av_textblock]
    [/av_section]

    Kind regards
    Max

    #1301852

    Hey digitalprint2222,
    Thank you for your patience, typically the iframe size is not controlled by it’s content, it is controlled by the lightbox popup that is showing the iframe.
    So for example you could try something like this css:

    div.mfp-iframe-scaler  {
      height: 150vh !important; 
      width: 100vw !important;
      }
    .mfp-iframe-scaler iframe {
        left: -15vw !important; 
        width: 90% !important; 
        height: 90% !important; 
    }
    

    please note that the iframe is inside of the mfp-iframe-scaler and typically closing the popup is done by clicking outside of the popup so this is why the css declares the width at 90%, you can try adjusting to suit your needs as this css is a general example.

    Best regards,
    Mike

    #1305556

    It does not work of course since I am not talking about a popup/lightbox.
    It has been clearly said in my post that i am talking about a simple iframe:
    <iframe src=”https://example.org/test/test/” style=”border:0px #ffffff none;” name=”myiFrame” scrolling=”no” frameborder=”0″ marginheight=”0px” marginwidth=”0px” height=”1080px” width=”1920px” allowfullscreen></iframe>

    Have you tried to use the code i gave you on your testpage?

    Max

    #1305569

    Hi,
    Thank you for the feedback, sorry my mistake, for your debugger code above please add the custom class color-section-for-iframe then use this css:

    #main > .color-section-for-iframe > .container {
    	width: 100%;
    	max-width: 100%;
    	padding: 0;
    }

    expected results:
    2021-06-14_053357.jpg

    Best regards,
    Mike

    #1305746

    Hi,
    it still does not work.
    digital-print-group.de/wp-content/screens/iframe.jpg
    digital-print-group.de/wp-content/screens/iframe2.jpg

    As you see, the colorsection stretches fullwidth (like it did before) but the iframe does not.
    I tried it with several sizes of “width=”” height=”” and even without these parameters

    Max

    #1305813

    Hi,
    From your screenshot it doesn’t look like you have the text element which has the iframe code in a color section as per your original request and debugger code, that is what I created the solution for, did you try it?
    The iframe is not contained by it’s own width, it is it’s parent container that you need to target, please try the above solution to examine and understand, I also linked to the working example from the screenshot in the Private Content area above that you could examine.
    If you link directly to the page you are working on I could help further.

    Best regards,
    Mike

    #1305887

    1: Maybe you want to fix you editor so that it doesnt create weird “”-characters when trying to copy the code back?
    2: I dont want urgently putting it in a colorsection. I really dont care. The only thing i want: Iframe full width

    Now i took the exact code and still it does not work:
    digital-print-group.de/wp-content/screens/iframe3.jpg
    Max

    #1305977

    Hi,
    Thank you for the feedback, in your latest test/screenshot I see that you didn’t add the custom class to the color section so the css solution I posted would work, such as the working example I linked to for the screenshot above.
    2021-06-16_055214.jpg
    In order to make the iframe full-width, the parent container needs to be adjusted, so your first option is to place it in a full-width element such as a color section and then set it’s container width to 100% and remove any padding & margin overriding the theme Layout & Dimensions
    2021-06-16_060633.jpg
    Please note that this has nothing to do with the width of the iframe, I’m talking about the container inside the color section.
    If you are not going to use a full-width element such as a color section, and the iframe is going to be in a code block (preferably), then add this custom class to the code block element code-block-for-iframe and use this css:

    .code-block-for-iframe {
    	width: 100vw !important; 
            position: relative !important; 
            left: calc(-50vw + 50%) !important;
    }

    2021-06-16_062650.jpg
    Please see the link to the working example below.

    Best regards,
    Mike

    #1306064

    OK, sorry, this was completely my fault.
    I simply forgot to add the class.
    It works now.
    Sorry again and thank you very much.

    Max

    #1306160

    Hi,
    Glad to hear that you have this sorted out, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Iframe Fullwidth?’ is closed to new replies.