Archived topic
Display 2 column on mobile
13 replies · Started by Janne on April 9, 2020
Hi.
Can you help me with displaying 2 columns instead of 1 on mobile in the blog? Found this code here. With the code I get two columns, but the two columns is only covering 50 % of the width.
@media (max-width: 767px) {
.mobile-grid-100 {
clear: none;
width: 50%;
}
}
Hi there,
What should happen to the featured post?
Also 50%?
Do you mean if the featured post also is only half the width? yes.
Try this instead:
@media (max-width: 767px) {
.generate-columns.mobile-grid-100 {
clear: none;
width: 50%;
}
}
It worked, thanks. Is it possible to get some air between the images?
And is it possible to remove some info when on a small screen? For example the categories.
Try this:
@media (max-width: 767px)
.generate-columns-activated .generate-columns-container {
margin-left: -40px;
}
.generate-columns-container>* {
padding-left: 40px;
}
.generate-columns-container .page-header {
margin-left: 40px;
}
.entry-meta {
display: none;
}
}
It worked. It hovever looks like the page is wider than what what shows. When we are inside a category page, the title is cut. Check the link in the first post. And is it possible to also remove author and time published?
Edited the CSS above:
https://generatepress.com/forums/topic/display-2-column-on-mobile-2/#post-1233294
Thanks, it worked. But is it possible to also remove author and time published?
My CSS above should do that already:
https://generatepress.com/forums/topic/display-2-column-on-mobile-2/#post-1233294
Looks like you didn't update the last block.
Didn`t copy all, sorry. Works like a sharm now! Thanks.
No problem :)
Hi may you help me in display 2 columns in mobile also for my site? I tried your css but doesn't work for me.
Thanks
Can you open a new topic for your question?
Thanks :)