Board index Themes Have one img embedded without border (next theme)

Skinning and designing Serendipity (CSS, HTML, Smarty)
User avatar
kybernator
Regular
 
Posts: 126
Joined: Sat Sep 22, 2012 10:15 pm

Postby kybernator » Sat Sep 24, 2016 7:50 pm

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

User avatar
yellowled
Regular
 
Posts: 6815
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany

Postby yellowled » Sat Sep 24, 2016 9:23 pm

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
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
yellowled
Regular
 
Posts: 6815
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany

Postby yellowled » Sat Sep 24, 2016 9:25 pm

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
amazon Wishlist - Serendipity-Podcast (German only, sorry)

User avatar
kybernator
Regular
 
Posts: 126
Joined: Sat Sep 22, 2012 10:15 pm

Postby kybernator » Sat Sep 24, 2016 9:35 pm

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 :-)



Return to Themes

Who is online

Users browsing this forum: No registered users and 2 guests