-
AuthorPosts
-
April 19, 2021 at 5:59 pm #1295319
Hi Guys,
Hope you’re doing well.
I would need some support with CSS styling where I am getting crazy because i haven’t found the cause why it didn’t work as it should. I know it’s specific Theme related, but perhaps you can help. In Private Content section I added the URL to our DEV Environment as well as a screenshot of the affected element which brings me into the madhouse ;).
The following styles were defined for this element:
@media only screen and (min-width: 360px) and (max-width: 422px) { canvas#canvas.animation2 { background-color: rgb(251, 250, 250) !important; max-width: 224px; max-height: 152px; position: absolute !important; top: 10%; left: 15%; }}
@media only screen and (min-width: 423px) and (max-width: 767px) { canvas#canvas.animation2 { background-color: rgb(251, 250, 250) !important; max-width: 224px; max-height: 152px; position: absolute !important; top: 30%; left: 50%; margin-right: -50%; transform: translate(-50%,-50%); } }
@media only screen and (min-width: 768px){ canvas#canvas.animation2 { background-color: rgb(251, 250, 250) !important; max-width:448px; max-height:302px; position: absolute !important; top: 10%; left: 15% !important; }}
The issues i experience is that the last definition doesn’t work. Means even on wider screens the element will remain in width: 224px; and height: 152px;. It seems as only the latest one “(min-width: 423px) and (max-width: 767px)” keeps active.
Would be glad if you have an idea.
Best regards,
FrankApril 21, 2021 at 8:21 am #1295716Hey Frank,
Thank you for the inquiry.
The css media query is working properly on our end. Please check the screenshot below.
Screenshot: https://imgur.com/BelvocZ
Screen width in the screenshot is 400px.
Best regards,
IsmaelApril 21, 2021 at 12:33 pm #1295790Hey Ismael,
Thank you for your reply.
Maybe, we have a misunderstanding here. What I mean is that the last definition doesn’t work. So I am referring to this:
@media only screen and (min-width: 768px){ canvas#canvas.animation2 { background-color: rgb(251, 250, 250) !important; max-width:448px; max-height:302px; position: absolute !important; top: 10%; left: 15% !important; }}
I know the css media query for lower screen resolutions is working as expected.
April 23, 2021 at 4:28 am #1296169Hi,
Thank you for the update.
It is ignoring the last css media query because the iframe has a maximum width of 500px.
<iframe loading="lazy" class="animation_automated_workflow" src="https://zs-dev.dev-sites.org/animation/animation2/zs_web_anim_06.html" width="500" height="400"> </iframe>
You may need to adjust the value of the width attribute or change the css media query.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.