Categories
General

Style for images with Photopress

A few of you have noted that the CSS classes available by default for inserted images don’t work very well. centered does center images, but it adds a break so multiple images end up in a vertical column. alignleft and alignright are intended for wrapping text around images, so they’ll break your blog layout if you don’t have enough text in a post. In the next version I’ll probably include an empty class for the default as a sneaky way to avoid complaints. However, you really should use a custom class. Here’s how:

Edit your theme’s style file (style.css), inserting a new class or classes to use for your images. This one adds some padding and a border:

img.pp_style {
padding: 3px;
border: 1px solid #000;
}

Now add pp_style to the list of classes at Options:Photopress. The first one in the list will be the default when you insert images using the Upload/Browse popup tool.

You can do the same thing for random images. By default they use the centered class but at Options:Photopress you can enter any class you’d like.

Avatar photo

By isaac

I like cats. he/him