WebSite X5Help Center

 
Luis F.
Luis F.
User

HTML Fragment Responsive Design NOT WORKING  en

Auteur : Luis F.
Visité 2082, Followers 1, Partagé 0  

The following was working perfectly with v.16.  I just updated to v.17 and now this does not work.

I have a Youtube chanel embeded link inside an HTML fragment that automatically resizes to the screen width.  However, upon udating to the new v.17 today, and after converting the project files, the HTML Fragment with the resonsive design code does not work at all... nothing shows up... BUT if I remove a part of the code then it shows up but is not responsive anymore.

Here is the code that works with v.16 inside the HTML Fragment:

-----------------------------------------

<div class="container">
<iframe src="https://www.youtube.com/embed/videoseries?list=blablablablablabla..." frameborder="0" allowfullscreen class="containerframe"></iframe>
</div>

-----------------------------------------

AND the...

CSS / Expert section code:

-----------------------------------------
.container {
position: relative;
width: 100%;
height: 0;
padding-bottom: 56.25%;
}
.containerframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

-----------------------------------------

NOW... once I upgraded to v.17, this code won't work and nothing shows up on the web browser.

HOWEVER, if I remove the code...

class="containerframe"

...from the iframe code, then everything shows up BUT it will not autorezise acording to the screen size.

SO...

In version 17, HOW do I make it to automatically rezise (as it worked with v.16) according to the screen size... how to I make this code responsive again?

In advanced, thanks.

Posté le
2 RéPONSES - 1 CORRECT
Incomedia
Stefano G.
Incomedia

Hello Luis .

This is most probably due to the new Grid system which now Website uses to build its own pages.

Since it now operates in a different way than before, it is possible that certain codes that used to work before no longer do now. You should try and double check your code in order to get it to work correctly with the new CSS Grid layout.

You can fix the issue by assigning a very wide pixel size to the object and then applying a max-width to it such as this -> style="max-width:100%; width:2560px;"

Alternatively, wait for other users to stop by who might have had a similar problem and already managed to solve it

Thank you for your understanding

Stefano

Lire plus
Posté le de Stefano G.
Luis F.
Luis F.
User
Auteur

There was an update for Website X5 v17 where they fixed the "new grid system" and now it takes all custome HTML, CSS, JS, etc.

Thanks.

Lire plus
Posté le de Luis F.