-
AuthorPosts
-
April 9, 2017 at 11:58 pm #775178
Hello Staff. Can I change the way that two cells in a grid row stack on a narrow screen? For example on this page http://new.ezdiquote.com/our-clinic/about-2/ the last element on the page is 3 related grid rows. At computer width the three rows are Top: image on left, text on right. Middle. image on right, text on left. Bottom: image on left, text on right. I want to keep that arrangement. On a narrow screen such as a phone the I would like the cells in the middle grid row to stack exactly like the the top and bottom rows, with the image above and the text below as in diagram below. Can you help me with that? Thanks, Rob
————
| Image |
————
| text |
————
| Image |
————
| text |
————
| Image |
————
| text |April 10, 2017 at 12:11 am #775185Hey rdswestnet,
To change the stacking order of the grids in mobile we need to create 2 sets of grids one for desktop view and one for mobile view and then we will use custom CSS to hide one of the sets in mobile and one set on the desktop.
1. Enable custom css class name for ALB elements http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/
2. Add this code to the Quick CSS section under Enfold > General Styling or to your child themes style.css file:
/*Show only in mobile or desktop*/ @media only screen and (min-width: 769px) { .only_mobile { display: none !important; }} @media only screen and (max-width: 768px) { .only_desktop { display: none !important; }}
3. Add class name “only_desktop” and “only_mobile” to the icon box set’s to be displayed only on desktop and only on mobile.
Best regards,
VinayApril 17, 2017 at 12:35 am #778526Thanks for that. I see I just need to uncomment the last line on this file: Enfold: Theme Functions (functions.php) That is a file that gets overwritten when Enfold is updated correct? Will that cause the CSS to stop working?
Rob
April 17, 2017 at 11:18 am #778621Hi Rob,
If you don’t use a child theme then it would overwritten during theme update and yes it would cause the css that uses the class name won’t be used. I would suggest using a child theme, you can refer on this post: http://kriesi.at/documentation/enfold/using-a-child-theme/
Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.