Archived topic
Responsive image size in post
5 replies · Started by Roy on June 17, 2017
Hi,
The image in the post is in the same size in all screen sizes...
How can I make the image size responsive? Isn't it should be built in with the theme?
The post link:
http://ganof.rbwise.com/news/register/
image Link:
https://s11.postimg.org/7fbac8ng3/image.png
Hi there,
The image is responsive.
It's just that the image is smaller than the container width even when the smallest screen is used.
You can use the hide-on-desktop hide-on-tablet hide-on-mobile classes if you want to insert different size of images at different devices?
Let me know if this helps.
Yes I understand...
There is an option not to hide the image...maybe use media querys...?
Yup you could do something like this:
@media (max-width: 768px) {
/* CSS in here for mobile only */
.entry-content img {
max-width: 200px;
}
}
@media (min-width: 769px) and (max-width: 1024px) {
/* CSS in here for tablet only */
.entry-content img {
max-width: 400px;
}
}
@media (min-width: 1025px) {
/* CSS in here for desktop only */
.entry-content img {
max-width: 600px;
}
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
awesome! great!
Great!