Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #896895

    Hi all,

    on a local installation I have some text right and the picture left. In the next part it changes; the picture will be right and the text left. This leads to the problem that on the mobile version it’s looking like: Pic,Text,Text,Pic.

    How can I set it to: Pic,Text,Pic,Text on the mobile version?

    Thx in advance!

    #896958

    Hey McCreight_Media,
    You maybe able to use float to change at mobile view, like this:

    @media only screen and (max-width: 767px) { 
    #ID-of-img {float: left !important; 
    #ID-of-text {float: right !important; 
    }

    you will need to add ID’s to the two elements and change the code according

    Best regards,
    Mike

    #897663

    Hey Mike, thanks for your answer.

    How can I add an ID to the text and the picture?

    Best regards,
    Björn

    #897842

    Hi,
    Please Turn on Custom CSS Class field for all ALB Elements
    Then you can add custom classes to the elements, sorry I mis-spoke when I said “ID’s”

    Best regards,
    Mike

    #898096

    Hi Mike,

    sorry, but I got warnings that the code isn’t correct.

    Best regards,

    Björn

    #898102

    Hi,

    Can you please paste the warning you received?

    Best regards,
    Jordan Shannon

    #903857
    This reply has been marked as private.
    #903893

    Hi,
    Sorry, I had mis-spoke, when using custom classes your css should look like this:

    @media only screen and (max-width: 767px) { 
    .class-of-img {float: left !important;} 
    .class-of-text {float: right !important;}
    }

    Best regards,
    Mike

    #906473

    It’s not working.

    Best regards,
    Björn

    #906561

    Hi,
    Another approach would be to have a duplicate section of the “WordPress CMS” text and image under the current one, and use the custom classes to hide one on mobile and the other on desktop. In the duplicate section reverse the image and text and use custom css like this to show one or the other on the correct device.

    @media only screen and (max-width: 767px) {
    .wp-text,.wp-picture {display: none !important;}
    }
    @media only screen and (min-width: 768px) { 
    .wp-text-2,.wp-picture-2 {display: none !important;}
    }

    This is where “wp-text-2 & wp-picture-2” are your new classes for the mobile view, and “wp-text & wp-picture” are your current classes for the desktop view. Also do not put a HR between the two.

    Best regards,
    Mike

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