Opened 5 years ago
Closed 5 years ago
#7340 closed defect (bug) (wontfix)
Revert Aligning Images in Write
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 2.6 |
| Severity: | critical | Keywords: | |
| Cc: |
Description
The new way of aligning images and likely text is messed up. It now adds a class which doesn't work in all cases for everyone. The way it was done before this was just fine. Revert it back... or make it work for everyone without changing themes.
Change History (1)
Note: See
TracTickets for help on using
tickets.

Aligning of images with css classes was introduced in WordPress 2.5. The same classes are used to align images with captions too. These classes are in both the Default and Classic themes, on the support forum and in many blog posts. They can be copied/pasted really easy for themes that don't have them yet. When themes are updated, they would probably include more styling.
If using captions, few more classes would have to be added so they look right:
/* Captions & aligment */ .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; -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 & aligment */Also, text alignment works as before.