Created
January 26, 2016 08:05
-
-
Save j-cam/6f1a9621d63c306e783e to your computer and use it in GitHub Desktop.
Wordpress: Removing Image and Caption Dimension Attributes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Attribution: http://wordpress.stackexchange.com/a/37768/35516 */ | |
.entry-content img, | |
.comment-content img, | |
.widget img { | |
max-width: 97.5%; /* Fluid images for posts, comments, and widgets */ | |
} | |
img[class*="align"], | |
img[class*="wp-image-"] { | |
height: auto; /* Make sure images with WordPress-added height and width >attributes are scaled correctly */ | |
} | |
img.size-full { | |
max-width: 97.5%; | |
width: auto; /* Prevent stretching of full-size images with height and >>width attributes in IE8 */ | |
} | |
.wp-caption { max-width: 100%; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment