Skip to content

Instantly share code, notes, and snippets.

@asilbalaban
Created May 4, 2014 13:46
Show Gist options
  • Save asilbalaban/f29fbc3d5c8443d101b7 to your computer and use it in GitHub Desktop.
Save asilbalaban/f29fbc3d5c8443d101b7 to your computer and use it in GitHub Desktop.
wordpress img css
img.size-auto,
img.size-full,
img.size-large,
img.size-medium,
.attachment img {
max-width: 100%; /* When images are too wide for containing element, force them to fit. */
height: auto; /* Override height to match resized width for correct aspect ratio. */
}
.alignleft,
img.alignleft {
display: inline;
float: left;
margin-right: 14px;
margin-top: 4px;
}
.alignright,
img.alignright .noalignment img.noalignment{
display: inline;
float: right;
margin-left: 14px;
margin-top: 4px;
}
.aligncenter,
img.aligncenter {
clear: both;
display: block;
margin-left: auto;
margin-right: auto;
}
img.alignleft,
img.alignright,
img.aligncenter {
margin-bottom: 12px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment