Richard
Richard

Reputation: 521

CSS question: how to remove the border from an image in WordPress

I'd like to remove the border from an image in WordPress.

It's the latest default theme (twenty eleven?)

In another question on this, I saw a link to a page that said, to change the "border-width" value. So I searched for "border-width" and changed the px value to "0", but this didn't do the trick.

I'm a beginner, so if possible simple steps will help. E.g. "change this to this" or "add this in this place in the css"

The image I'd like to remove the border from is the signature at the bottom of this page: http://richardclunan.com/

There's also a border around the photo closer to the top of that page, which I can either keep or get rid of that border. If I get rid of it, then I'll probably add a border to the image itself, if it's easier to get rid of all borders in the css.

Thanks, Richard

Upvotes: 3

Views: 6418

Answers (3)

missmonkee
missmonkee

Reputation: 783

.gallery a img { border: 0 !important; }

Upvotes: 0

Joseph Marikle
Joseph Marikle

Reputation: 78520

You can get rid of all the borders by changing the this rule in style.css (line 935)

#content .gallery .gallery-icon img {/* Add fancy borders to all WordPress-added images but not things like badges and icons and the like */
    border: 1px solid #ddd;
    padding: 6px;
}

to

#content .gallery .gallery-icon img {/* Add fancy borders to all WordPress-added images but not things like badges and icons and the like */
    border: 0;
    padding: 6px;
}

or you can inline the style on the image (see mopsled's post)

Upvotes: 1

PeeHaa
PeeHaa

Reputation: 72652

You can either change

border: 1px solid #DDD;

to

border: 0;

@ style.css line 935

But that will affect all images in that style.

If you don't want that you can add an extra class to the image, e.g. no-border and add:

#content .no-border { border: 0; }

in your stylesheet

Upvotes: 4

Related Questions