LucB
LucB

Reputation: 11

Vertical image are going horizontal on certain mobiles

I have a website where users can post images in an article. The images are in portrait mode, and they always should be. But on some mobile phones (Iphone X, Iphone 5C) (not my Redmi note 5) they're going horizontal.

Here's the HTML code for one image :

<a href="MyImg.jpg">
    <img class="alignnone size-large" src="myImg.jpg" alt="IMG_7768_1200" width="768" height="1024" />
</a>

And the CSS:

img.alignnone {
    display: block;
    max-width: 95%;
    width: auto;
    height: auto;
}

.alignnone, img.alignnone {
    margin-right: 2.5em;
    margin-top: 2em;
    display: inline;
    border: 5px solid #555555;
}

I'm out of idea. Is this a CSS problem ?

Upvotes: 0

Views: 125

Answers (1)

Codesigner
Codesigner

Reputation: 587

This is an issue with image's metadata. It was set when the camera took the picture. It's not something you can change with your CSS.

Upvotes: 1

Related Questions