Posts Tagged ‘WordPress’

Centering images with WordPress

Tuesday, January 15th, 2008

Can be the devil, depending on how your theme is configured and how good you are at CSS. Tonight, I struggled for longer than my geek-pride will let me admit, to get Jen’s blog to display centered images. Basically, if you have a section in your stylesheet that goes something like this:

.entry img {
border: 1px solid #888;
float: left;
margin: 5px 10px 5px 0;
}

Comment out the “float: left” like this:

.entry img {
border: 1px solid #888;
/*float: left;*/
margin: 5px 10px 5px 0;
}

Then you will be able to center images in the visual editor by clicking on an image and then the ‘align center’ button. Now, I will be the first to admit that there might be a better way of going about this, but what you see above worked for me, and will hopefully continue to work and not break something else. If anyone has a better solution / workaround, please let me know.

The above code is to make an image centered in the post, with text above and below the image. If you’re trying to center an image and wrap text around it, I cannot help you and I have not tested the above to see if that will work (wrapping text all the way around an image, is just silly in my opinion).

WordPress registration spam is the devil

Friday, December 7th, 2007

I’ve been getting quite a bit of registration spam recently, and it’s really ticking me off. So, tonight instead of doing my homework, I decided to write a plugin that will ‘hopefully’ take care of the problem. At this point, it is hacked together quite badly, and is not user friendly at all, but I plan on changing that this weekend (after my homework). Would anyone like to test it out before I release it to the world? It uses reCAPTCHA so you’ll have to sign up for a free public and private key at their site. I’m not sure that it works one-hundred-percent of the time yet, but I’m logging failed attempts to the database, so we should know within a few days.

I should be doing homework right now

Tuesday, September 25th, 2007

Instead, I decided to upgrade to the newly released WordPress 2.3.  The upgrading process was as short and simple as ever, so I decided to relive the moment by upgrading Geoff’s blog as well (lets see how long it takes him to notice).

Next Monday (October 1st) I will be leaving for Japan with my father and my next-door neighbor.  I’m bringing my MacBook along for the journey, and plan on blogging as much as possible in between taking pictures and doing some homework.  I’ll be in Japan over my birthday (The 7th) so everyone who would normally celebrate with me, will just have to wait until I get back.