CMS Content iFrame sizing and alignment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2014 10:14 AM
I have a content page which loads an iframe containing a record producer form. By default, the form width is set to 100% width:
Aside from setting the 'Sizing' (height, width) in the iframe form, how can I modify the parameters of the iframe to change it's alignment, or apply a % width as opposed to a 'px' value? I basically just want to set the iframe to 85% width, auto height, and centre it on the page.
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2015 10:14 AM
1) Is it possible to also add alignment code to the css?
so if iframe#myIframe { width: 75%;} will change the width of the iframe, what could be added to make the frame stick in the center of the page?
If you are going to stick with using baseline (OOB) CMS structure then you might have to modify a combination of the layout macro, CSS, and the iframe element. The reason for this is the baseline uses a lot and I mean a lot of tables to do all the alignment.
2) Is there any way to stylize the iframe? I have noticed another post titled "iframes in CMS" where there is a sample of code to still embed the catalog within an ESS page without using Iframes. I imagine this would allow for the catalog to take on the formatting and style of the css as opposed to having the appearance of the oob catalog. Would this be a correct assertion?
I'm not positive on that script (if I'm looking at the same post as you did). However, I think it could bring in the catalog without the iframe and give you a little more flexibility in the styling. When you get down to the item itself though there are portions of the catalog/shopping cart that you will need to modify.
I encourage you to go down the second route as you will learn a lot more on how the system works.
You also might find this post interesting and helpful:
UI Pages in CMS without iFrames
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2015 04:21 PM
Thanks again Ben, appreciate your feedback.