Wordpress Generated CSS classes

Every WordPress installation should have these CSS classes defined so they could use the text editor's functions properly. Some functions like image aligncenter don't work properly if they lack these CSS classes.

Source: http://codex.wordpress.org/CSS

.aligncenter, div.aligncenter {
   display: block;
   margin-left: auto;
   margin-right: auto;
}

.alignleft {
   float: left;
}

.alignright {
   float: right;
}

.wp-caption {
   border: 1px solid #ddd;
   text-align: center;
   background-color: #f3f3f3;
   padding-top: 4px;
   margin: 10px;
   /* optional rounded corners for browsers that support it */
   -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;
}

Notes: caption is not centered

Comments

Popular posts from this blog

First post!

Blog inactivity and spam comments

The Countess in Diablo II