CART

Login

« Back

This is a tip for the newbie on wordpress theming. If you install free themes and your having a hard time controlling your image alignment to left, right or center. This is because your using an older theme, you may not have these styles in your style sheet.

Here are the styles – you can just copy and paste them into your style.css file or wherever your CSS styles are located:

<br />.aligncenter,<br />div.aligncenter {<br />   display: block;<br />   margin-left: auto;<br />   margin-right: auto;<br />}<br /><br />.alignleft {<br />   float: left;<br />}<br /><br />.alignright {<br />   float: right;<br />}<br /><br />.wp-caption {<br />   border: 1px solid #ddd;<br />   text-align: center;<br />   background-color: #f3f3f3;<br />   padding-top: 4px;<br />   margin: 10px;<br />/* optional rounded corners for browsers that support it */<br />   -moz-border-radius: 3px;<br />   -khtml-border-radius: 3px;<br />   -webkit-border-radius: 3px;<br />   border-radius: 3px;<br />}<br /><br />.wp-caption img {<br />   margin: 0;<br />   padding: 0;<br />   border: 0 none;<br />}<br /><br />.wp-caption p.wp-caption-text {<br />   font-size: 11px;<br />   line-height: 17px;<br />   padding: 0 4px 5px;<br />   margin: 0;<br />}<br /><br />

Comments are closed.