
-
AuthorPosts
-
January 13, 2018 at 3:43 pm #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!
January 13, 2018 at 10:39 pm #896958Hey 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,
MikeJanuary 15, 2018 at 6:17 pm #897663Hey Mike, thanks for your answer.
How can I add an ID to the text and the picture?
Best regards,
BjörnJanuary 16, 2018 at 3:57 am #897842Hi,
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,
MikeJanuary 16, 2018 at 6:27 pm #898096Hi Mike,
sorry, but I got warnings that the code isn’t correct.
Best regards,
Björn
January 16, 2018 at 6:42 pm #898102Hi,
Can you please paste the warning you received?
Best regards,
Jordan ShannonJanuary 28, 2018 at 11:04 am #903857This reply has been marked as private.January 28, 2018 at 4:12 pm #903893Hi,
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,
MikeFebruary 1, 2018 at 9:23 pm #906473It’s not working.
Best regards,
BjörnFebruary 2, 2018 at 1:53 am #906561Hi,
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 -
AuthorPosts
- You must be logged in to reply to this topic.