
WordPress 2.6 Image caption align fix
mandag, juli 21st, 2008
I’ve been just updating my blog with WordPress 2.6 – an upgrade which I’m very pleased of, with lots of new functions added.
The far most usefull one is the Image Captions, which allows your to upload, modify, and *finally* add text below the picture inserted. Though, like most other people I use a custom theme on my blog which doesn’t have the CSS-classes build for the new WP 2.6. Because of this the “alignleft, alignright and centered” classes does NOT exist on WP themes build on WP 2.5 and earlier. We then have to define these CSS-classes in our “style.css” file in the “themes/mytheme” folder. Simply add these lines to the file and save:
/**** WordPress 2.6 Caption Align-class update *****/
img.centered {
display: block;
margin-left: auto;
margin-right: auto;
}
img.alignright {
padding: 4px;
margin: 0 0 2px 7px;
display: inline;
}
img.alignleft {
padding: 4px;
margin: 0 7px 2px 0;
display: inline;
}
.alignright {
float: right;
}
.alignleft {
float: left;
}
/**** END caption-class ****/
Now you may still have problems if your theme has been highly modified. You may then look at the sourcecode of you website and see if the classes come up, and look after other CSS code with may interfere with the one from the Image Caption. By default this is not a problem.
I found the workout on this page:
http://wordpress.org/support/topic/164999
After reading on this thread:
http://wordpress.org/support/topic/189480
Hope it helps!
I’ve been just updating my blog with WordPress 2.6 – an upgrade which I’m very pleased of, with lots of new functions added.
The far most usefull one is the Image Captions, which allows your to upload, modify, and *finally* add text below the picture inserted. Though, like most other people I use a custom theme on my blog which doesn’t have the CSS-classes build for the new WP 2.6. Because of this the “alignleft, alignright and centered” classes does NOT exist on WP themes build on WP 2.5 and earlier. We then have to define these CSS-classes in our “style.css” file in the “themes/mytheme” folder. Simply add these lines to the file and save:
/**** WordPress 2.6 Caption Align-class update *****/ img.centered { display: block; margin-left: auto; margin-right: auto; } img.alignright { padding: 4px; margin: 0 0 2px 7px; display: inline; } img.alignleft { padding: 4px; margin: 0 7px 2px 0; display: inline; } .alignright { float: right; } .alignleft { float: left; } /**** END caption-class ****/
Now you may still have problems if your theme has been highly modified. You may then look at the sourcecode of you website and see if the classes come up, and look after other CSS code with may interfere with the one from the Image Caption. By default this is not a problem.
I found the workout on this page:
http://wordpress.org/support/topic/164999
After reading on this thread:
http://wordpress.org/support/topic/189480
Hope it helps!

Folk er naive og eier ikke musikksmak. De dangler med skolten frem og tilbake i en takt som ikke er der, og forsøker å forestille seg at dette er Moldes beste og mest sære kulturmusikk. Når til og med jeg hører takten, er dette latterlig. De har jo betalt 2-300 norske blanke for å sitte med ræva og høre på et nærmest random reportoar av kjente artister som er blitt printet med flott design på 08-katalogen. De er ikke verd pengene, noe man ikke innrømmer. Det er bedre å fortrenge musikken og prøve å forstå den. Atmosfæren forran scenen er større enn selve “musikken” som skal inn i øret alikevel. Øl, peanutter og et ekstraordinært lysshow på scenen blir hovedattraksjonen. Jeg fikk ikveld på min siste konsert nesten sprengt ørene på “future”-musikk og perkusjon av Marilyn Mazur – som for øvrig var ganske flink – og hennes danske blødkake-band med ei skrikende høne på scenekanten som ødela det hele. Det er virkelig sykt å se hvordan folk sitter på flesket sitt å prøver å kose seg med dette tilfeldige rølpet av lyder som blir bust ut av 7 instrumenter på en gang. Konserten var noe spennende og litt annerledes så lenge Marilyn Mazur fikk styre roret alene med sin litt alternative pianist til hjelp. Når resten av danskebåten kommer trampende inn på scenen blir derimot lyden en annen. Jeg springer vekk fra kulturhuset en halvtime før slutt for å hente et gjenglemt strømadapter – uviten om at to kaniner vokter dette og ikke lar seg svare i løpet av kvelden. Pølse på Hydro og “We will rock you” til foreldrene i forsetet. Slikt er ikke moro lenger i en alder av 20..
Det var virkelig ikke noen grenser for hva vi kunne prate om ikveld, though jeg – eller forsåvidt ingen av oss – kjente hverandre så veldig godt. Så setter jeg Waiting for the 7:18 på repeat for fjerde gang og jeg bør virkelig klare å skrive litt fortere enn det jeg gjør nå her på bloggen.. beklager sterkt dette.