Skip to content

Instantly share code, notes, and snippets.

@palimadra
Created April 28, 2012 11:30
Show Gist options
  • Save palimadra/2518169 to your computer and use it in GitHub Desktop.
Save palimadra/2518169 to your computer and use it in GitHub Desktop.
Add styling captions to the images on your WordPress based site
/* add this code to style.cc */
/* Captions */
.aligncenter,
div.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
}
.wp-caption {
border: 1px solid #ddd;
text-align: center;
background-color: #f3f3f3;
padding-top: 4px;
margin: 10px;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
.wp-caption img {
margin: 0;
padding: 0;
border: 0 none;
}
.wp-caption p.wp-caption-text {
font-size: 11px;
line-height: 17px;
padding: 0 4px 5px;
margin: 0;
}
/* End captions */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment