Image Centering Fail – need your expertise!
-
Hi guys,
I’ve searched the forum for solutions but I cannot seem to solve this issue despite reading previous solutions from other forum members for what seems like hours now.
Here’s my site:
https://www.oliverpohlmann.com/
A bit of background:
I found that the images appeared too large on-screen when I clicked on them from the gallery view. ie. when they load to this view:
https://www.oliverpohlmann.com/archives/196/sony-dsc-25So I resized the images using the media pop-up box, but they still appeared too big for some reason. It’s almost as if they’re scaled to fit the screen despite the image file being smaller.
So I set a height limit in WP under Settings > Media to a value of 750px to ensure the images didn’t require scrolling and kept the width at 950px.
But now, they align on the left and the ‘centered’ option in the media box doesn’t have any affect.
Here’s the code. Am I missing something?
/* Floats & Images */
.right { float: right; }
.left { float: left; }
.middle {margin: 0 auto;float:left;}
.clear { clear: both; }
img.centered{display: block;margin-left: auto;margin-right: auto;max-width:950px}
img.alignright{padding: 4px 0 4px 4px;margin: 3px 0 2px 10px;display: inline;max-width:950px}
img.alignleft{padding: 4px 4px 4px 0;margin: 3px 10px 2px 0;display: inline;max-width:950px}
img.alignnone{padding:4px 4px 4px 0; margin:3px 10px 2px 0;display: block;max-width:950px}
.alignleft{float: left;}
.alignright{float: right;}
.aligncenter, div.aligncenter{display: block;clear:both;margin-left: auto;margin-right: auto;}
.thumbnail, .attachment-thumbnail {margin:0 1.5em 1.5em 0;float:left}
.attachment-medium {max-width:950px;overflow:hidden;display: inline}
.attachment-large {max-width:950px;overflow:hidden;display: inline}
- The topic ‘Image Centering Fail – need your expertise!’ is closed to new replies.