Page 1 of 1

Have one img embedded without border (next theme)

Posted: Sat Sep 24, 2016 7:50 pm
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

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

Posted: Sat Sep 24, 2016 9:23 pm
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

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

Posted: Sat Sep 24, 2016 9:25 pm
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

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

Posted: Sat Sep 24, 2016 9:35 pm
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 :-)