Skip to content

Instantly share code, notes, and snippets.

@serial
Forked from jlengstorf/wp-img-defaults.css
Created July 7, 2024 11:41
Show Gist options
  • Save serial/24eaf1d8e200a3a1b7f4f1af1e9d68cb to your computer and use it in GitHub Desktop.
Save serial/24eaf1d8e200a3a1b7f4f1af1e9d68cb to your computer and use it in GitHub Desktop.
Default styling for WordPress image alignment and captions
/*
* Default WP Alignment Classes
*****************************************************************************/
.aligncenter,.alignleft,.alignright {
display: block;
padding: 0;
}
.aligncenter {
float: none;
margin: .5em auto 1em;
}
.alignright {
float: right;
margin: .5em 0 1em 1em;
}
.alignleft {
float: left;
margin: .5em 1em 1em 0;
}
.wp-caption {
padding: 5px 0;
border: 1px solid #555;
background: #444;
text-align: center;
}
.wp-caption img {
display: inline;
}
.wp-caption p.wp-caption-text {
margin: 5px 0 0;
padding: 0;
text-align: center;
font-size: 75%;
font-weight: 100;
font-style: italic;
color: #ddd;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment