I have a small image – see https://www.news.cyprus-property-buyers.com/wp-content/uploads/2017/07/cmc1.png that I put at the foot of some on my articles.
I displays at the correct size (131 x 11px) when viewed on a desktop, but is stretched to fill the screen width when viewed on a mobile phone – see https://imgur.com/a/CVHBaV8
I have contacted Imagify, which I use to compress all my images about the problem and they replied:
“Please note that your theme is responsible to display the correct size needed on your website locations and according to the visitor’s screen.
“This type of issue is not related to Imagify; it should be addressed by the theme provider.”
The code used to display the image as follows:
You can view the post at https://www.news.cyprus-property-buyers.com/2024/01/30/limassol-dominated-the-cypriot-property-market-in-2023/id=00168437
Any thought on how I may correct this?
Thanks
Nigel
I’m wondering if this problem is related to the image alignment issue I reported at https://forum.tagdiv.com/topic/imagify-problem-solved/ ?
Hi,
I did a test and for me, this issue does not happen -> https://i.imgur.com/wY2V1yg.png
You can try to remove the CSS, but I don’t know if this is the cause.
Thank you!
Hi Anamaria
I may have solved the problem with the stretched image on mobiles:
At lines 724 – 727 of /td-composer/mobile/style.css, the code reads:
.alignnone img,
.aligncenter img {
width: 100%;
}
I believe this is what’s causing the stretched image problem. Editing the code to read:
.alignnone img,
.aligncenter img {
/* width: 100%; */
}
resolves the problem.
But I’m not sure if it causes different problems elsewhere.
Regards
Nigel
I’ve applied the /* width: 100%; */ fix to the style.css in my child theme and removed it from wp-content\plugins\td-composer\mobile\style.css.
But the stretched image problem returns because it’s picking up the css from \td-composer\mobile\style.css rather than the one from my child theme’s style.css.
How can I fix this to avoid editing the \td-composer\mobile\style.css every time you issue an updated Newspaper theme?
(I’ve looked through https://forum.tagdiv.com/the-child-theme-support-tutorial/, but it doesn’t help.)
Thanks
Nigel
