Hello team,
following my previous topic
https://kriesi.at/support/topic/change-the-size-of-the-featured-image-without-plugin/
Everything is ok but not in the mobile version. The featured post in the post is to streched in height.
Is the possible to change the previuos code you sent to solve this problem?
img.attachment-entry_with_sidebar.size-entry_with_sidebar.wp-post-image {
height: 400px !important;
}
A link to a sample post is reported in the private area
Hey turistai,
Thank you for using Enfold.
Please replace the css code with this so that it will only affect the desktop view or screens wider than 767px.
@media only screen and (min-width: 767px) {
/* Add your Mobile Styles here */
.attachment-entry_with_sidebar.size-entry_with_sidebar.wp-post-image {
height: 400px !important;
}
}
Best regards,
Ismael
Thanks Ismael.
Seems it works well although I don’t know what “/* Add your Mobile Styles here */” means in the code.
Is it necessary? To be replaced by some other element?
Secondly: the new code is compatible with the following one (also active)?
@media only screen and (max-width:767px) {
.avia-slideshow-inner, .avia-slideshow-inner img {
height: 170px !important;
}
Hi,
Any css code that you enter in the media query of max width 767 will affect the styles in portable device
/* Add your Mobile Styles here */ is more like a comment or a reference :)
please check this link for more info https://css-tricks.com/snippets/css/media-queries-for-standard-devices/
The new code can be enclosed in the @media query if that was your question.
For the code to work properly please ensure that the code has proper opening and closing brackets @media … { … }
In the above example the closing bracket is missing.
Best regards,
Vinay