Hide or Center Image on Post List View Mobile
-
I am wondering if anyone can help me to center my image with the post excerpts underneath in the list view on mobile only? I have the list view look how I want it for everything except for in portrait mobile view!
http://www.summitforwellness.com/blog/I’m using the theme aaron
Thank you!
-
What do you mean “in the list view”?
Thank you for asking Andrew!
By list view, I mean the page that has all my blog posts, not under an individual post view. So the url I put down is what I mean by “list view”
And what do you consider as mobile?
Hmmm I’m not sure in pixel size. On my Galaxy s6 when it is in portrait view the excerpt is a tiny tall column right next to the image, but in landscape mode it looks just fine. I hope that helps!
If you’re not using a Child Theme, and if the theme doesn’t have a section for CSS modifications then do the following:
- Install this Custom CSS Manager plugin http://wordpress.org/plugins/custom-css-manager-plugin
- use its “CSS Code” section of the dashboard to hold your CSS modifications:
-
(put this code in)
@media screen and (min-width: 360px) { .blog .entry-content .wrap-content { display: block; float: none; text-align: left; width: 100%; } .blog .entry-content { text-align: center; } }
- Save
Alternatively use your Child Theme style.css file to hold your CSS modifications
That worked great for when the phone is in Portrait mode! But it ended up changing the position of the image for when the phone is in landscape as well. I tried changing the min-width: 150px but that didn’t seem to keep the image on the left in landscape mode.
In fact, it had changed the layout on my desktop version as well for some reason.
I should have put “max-width” instead of “min-width”
Great, that worked. Thank you so much!
Can anyone tell me what the code would be to make any image in a blog POST center in mobile only?
I am having a problem that the text wrap around my images is formatted poorly when I have the images right aligned. Looks great on desktop, but horrible in mobile. I think the solution is to center the images with no wrap on all of my mobile posts. But, I don’t know how to write the Custom CSS.
Here’s an example page: http://www.brianpasko.com/how-to-look-awesome-in-photographs/
Please open a new thread to discuss your issue: https://wordpress.org/support/forum/how-to-and-troubleshooting#postform
- The topic ‘Hide or Center Image on Post List View Mobile’ is closed to new replies.