Roumazeilles.net

WordPress 2.6 and images

WordPress v2.1Minor information about using WordPress v2.6 (the latest revison of this great blog/web-site-wrinting tool).

I had a few difficulties to ensure that images where correctly aligned and displayed after the improvements in their presentation in WP2.6. For those really interested, I ended up adding the following to my CSS file:

  1. /*************************************/
  2. /* Align code for WP2.6 compatiblity */
  3. /*************************************/
  4. .aligncenter, div.aligncenter {
  5.     display: block;
  6.     margin-left: auto;
  7.     margin-right: auto;
  8. }
  9.  
  10. .alignleft {
  11.     float: left;
  12. }
  13. .alignright {
  14.     float: right;
  15. }
  16.  
  17. .wp-caption {
  18.     border: 1px solid #ddd;
  19.     text-align: center;
  20.     background-color: #f3f3f3;
  21.     padding-top: 4px;
  22.     margin: 10px;
  23.     /* optional rounded corners for browsers that support it */
  24.     -moz-border-radius: 3px;
  25.     -khtml-border-radius: 3px;
  26.     -webkit-border-radius: 3px;
  27.     border-radius: 3px;
  28. }
  29.  
  30. .wp-caption img {
  31.     margin: 0;
  32.     padding: 0;
  33.     border: 0 none;
  34. }
  35.  
  36. .wp-caption p.wp-caption-text {
  37.     font-size: 11px;
  38.     line-height: 17px;
  39.     padding: 0 4px 5px;
  40.     margin: 0;
  41. }

Thanks to the support of the WordPress.org forum.

Other similar articles:



  • feed of the comments.

Leave a Reply Comments


http://www.roumazeilles.net/

Copyright (c) 1999-2009 - Yves Roumazeilles (all rights reserved)

Latest update: 8-sep-09

Search provided by Google.com
Roumazeilles.net
Roumazeilles.net