Tagged: x
-
AuthorPosts
-
March 11, 2017 at 12:42 pm #1403237
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
March 11, 2017 at 12:58 pm #1403244This reply has been marked as private.March 11, 2017 at 10:51 pm #1403529Hi 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!
March 12, 2017 at 6:30 am #1403723I am sorry no luck yet…. does not work sorry
March 12, 2017 at 6:32 am #1403724This reply has been marked as private.March 12, 2017 at 7:15 am #1403768Hi there,
Unfortunately it has style within
iframe
tag and there is no way we can edit it, please see the attachment.Thanks.
March 12, 2017 at 7:28 am #1403776Ok i understand you. Is there a way to set a width for a column? Instead of 1/3+1/3+1/3
Thanks
March 12, 2017 at 1:12 pm #1403917Hi 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!
March 12, 2017 at 1:42 pm #1403934Sorry 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
RonaldMarch 12, 2017 at 9:23 pm #1404279Hello 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.
March 13, 2017 at 1:24 am #1404463I 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,
RonaldMarch 13, 2017 at 1:31 am #1404466Hi there,
I put original
iframe
code 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.
March 13, 2017 at 1:43 am #1404472Thanks 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
March 13, 2017 at 1:48 am #1404477The 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.
March 13, 2017 at 1:49 am #1404478THOUSAND 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 -
AuthorPosts