Have one img embedded without border (next theme)

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
kybernator
Regular
Posts: 135
Joined: Sat Sep 22, 2012 10:15 pm

Have one img embedded without border (next theme)

Post by kybernator »

Images embedded have a very small border, 1 px or so, I suppose, which is fine. I am not sure if this border is styled by Next, if not, please forgive me for posting here in the themes-section.

For one particular img, I would like it to be displayed without this border, preferrably by just editing the HTML of the page where it is embedded- how could that be done, please?

Cheers, Bernd
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Have one img embedded without border (next theme)

Post by yellowled »

kybernator wrote:For one particular img, I would like it to be displayed without this border, preferrably by just editing the HTML of the page where it is embedded- how could that be done, please?
Method A (recommended):

Add

Code: Select all

.borderless {
    border: 0 !important;
}
to your user.css and in the markup for that page, find the <img> element for that image. It might already have a class or not. If it already has a class, add the borderless class (first example below), if not, add the class attribute and the borderless class (second) like so

Code: Select all

<img class="serendipity_image_left borderless" src="…" />
<img class="borderless" src="…" />
Method B (probably easier here):

Find the image in the markup and add inline styles (which usually are bad, so don't use them all the time. Ideally, you should always work with your user.css.

Code: Select all

<img class="…" src="…" style="border:0!important;" />
I'm not saying it's required, and I'm happy to help with even small CSS issues like this, but just as a companion, Little Boxes is a great, free book (German only, though) on the basics of HTML/CSS.

YL
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Have one img embedded without border (next theme)

Post by yellowled »

kybernator wrote:Images embedded have a very small border, 1 px or so, I suppose, which is fine. I am not sure if this border is styled by Next
Adding to that, yes, the border is from Next, but there is a similar border in s9y's fallback styles. This is usually done because images with a background color close to the theme's background color usually look weird, especially in a gallery.

YL
kybernator
Regular
Posts: 135
Joined: Sat Sep 22, 2012 10:15 pm

Re: Have one img embedded without border (next theme)

Post by kybernator »

Thanks for the book recommendation, but also that you are willing to help directly - I appreciate both!

I am willing to learn, and have done so again and again, also here on the forum, but sometimes, especially when time constraints are tight, it is very good to be able to ask the people who just know stuff :-)
Post Reply