Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1403237

    RPronk
    Participant

    Hello, I have a widget which has iframe code. I wish to plan it either center or right aligned. Do I need a class for that?

    page: http://vanderheijdenkappers.nl/test/

    widget code: <iframe scroling=”no” width=”160″ height=”120″ allowtransparency=”1″ src=”https://www.wiewathaar.nl/embed.php?sid=******&c=1″ border=”0″ frameborder=”0″></iframe>

    Thanks for your help

    #1403244

    RPronk
    Participant
    This reply has been marked as private.
    #1403529

    Rad
    Moderator

    Hi there,

    Thanks for writing in.

    Please change it to this

    <iframe scroling="no" width="160" height="120" allowtransparency="1" src="https://www.wiewathaar.nl/embed.php?sid=******&c=1" border="0" frameborder="0" style="max-width: 160px;"></iframe>

    That should do it 🙂

    Cheers!

    #1403723

    RPronk
    Participant

    I am sorry no luck yet…. does not work sorry

    #1403724

    RPronk
    Participant
    This reply has been marked as private.
    #1403768

    Christopher
    Moderator

    Hi there,

    Unfortunately it has style within iframe tag and there is no way we can edit it, please see the attachment.

    Thanks.

    #1403776

    RPronk
    Participant

    Ok i understand you. Is there a way to set a width for a column? Instead of 1/3+1/3+1/3

    Thanks

    #1403917

    Rupok
    Member

    Hi there,

    If you need to set width for a column then use single column and apply CSS within Style field to control width or max-width. You can use margin: 0 auto; display: block; to keep that in middle.

    Thanks!

    #1403934

    RPronk
    Participant

    Sorry I have to get back on this. I though it would be a simple issue…. The iframe always has to be presented next to a block quote as the example shows: http://vanderheijdenkappers.nl/test/

    I think in the future w have to build more then 50 sites like this. Now I have four sites where I have to do this trick. The setting is as in the test page, iframe left, quotation right. Iframe and quotation should be near to each other.

    Sorry to keep asking, if we can not find a solution I will search for other people to help me. No problem

    Thanks
    Ronald

    #1404279

    Rue Nel
    Moderator

    Hello Ronald,

    Thanks for updating in! Do you want to control the contents of the text element to align either left, center or to the right? If that is the case, we will just have to add a custom width to the iframe instead. Please edit your page in Cornerstone and insert the following custom css in the settings tab, Settings > Custom CSS

    body .entry-content embed, 
    body .entry-content iframe, 
    body .entry-content object {
        width: 160px !important;
        margin: 0 auto !important;
    }

    And to align it, simply go to the text element settings and set the alignment.

    Please let us know how it goes.

    #1404463

    RPronk
    Participant

    I am sorry, as soon as I select the iframe code and set it to align right, the iframe does not function anymore and all I see is the code being displayed on the website.

    A right aligned iframe would work for me, but I am open for many solution. What I think the most simple solution is to set the column width on the max of the iframe. Then there is no issue anymore of left or right aligned. Therefor my last question was can I set the maximum width of the column?

    Thanks for helping me,
    cheers,
    Ronald

    #1404466

    Christopher
    Moderator

    Hi there,

    I put original iframecode and now it displays fine on center of page, please check it.
    We do not recommend to set width for columns as this breaks responsive layout.

    Thanks.

    #1404472

    RPronk
    Participant

    Thanks a lot, this already looks a lot better! It seems I am taking the wrong approach to center or right alaign the iframe. This may seem as a silly question but I think this is where the crux is now. How did you center the iframe?

    I copy and paste the code from the iframe, pressed the button right align and from there on it does not work so it seems you are taking a different approach

    thanks

    #1404477

    Christopher
    Moderator

    The code Rue Nel provided in previous replay did the trick. I checked the page and found out iframe format was not correct, so I went ahead and fix the code.

    Thanks.

    #1404478

    RPronk
    Participant

    THOUSAND THANKS!
    I will try if I replicate what you did on the front page, otherwise I still need to come since I have to do this for now four more sites.

    Thanks for belong me so far 🙂
    Cheers