Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #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,
    Frank

    #1295716

    Hey 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,
    Ismael

    #1295790

    Hey 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.

    #1296169

    Hi,

    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

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.