How to remove image border

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: How to remove image border

Post by schimanke »

Ah, okay. It was the browser cache... Thanks again, Garvin!
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: How to remove image border

Post by yellowled »

garvinhicking wrote:I've never addressed this, does anyone know what it takes, and if it even works?
This may sound very simple, but if it worked before (I still don't think so.), inline styles in the RSS feed only should do the trick. However, I have no idea whether and how this is possible, nor do I know whether this is okay with the RSS spec.

YL
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: How to remove image border

Post by Don Chambers »

garvinhicking wrote:I do think this RSS-Feed thing actually is an issue. It should look as intended in the feeds as well, so we somehow will need to get the CSS styling into the RSS feed. I've never addressed this, does anyone know what it takes, and if it even works?
HTML is escaped in the XML feeds... some browsers might be smart enough to figure out that <img style="float: left; blah blah"> means <img style="float: left; blah blah">.
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: How to remove image border

Post by garvinhicking »

Hi!

We can't add inline styles in the RSS feed only, because we insert those styles inside the entry body; so it's unconditional there.

What we would need is a way to reference the CSS inside the RSS feed. Maybe a <style...>@import</style> block inside the entrybody?

Anyone here who'd like to do some testing with this and how it displays in RSS readers?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: How to remove image border

Post by yellowled »

garvinhicking wrote:What we would need is a way to reference the CSS inside the RSS feed.
I think we can trust Frank Bueltge on this, although he's using the wrong blog engine. :wink:

Code: Select all

<?xml-stylesheet href="rss.css" type="text/css"?>
http://bueltge.de/wp-rssfeed-mit-css-gestallten/148/ (German only, sorry.)

YL
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: How to remove image border

Post by garvinhicking »

Hi!

Hm, maybe this only only affect the rendering of the XML inside the browser, instead of the feed contents inside a feed reader.

Anyhow...I don't have the time to testdrive this. Anyone here up for the challenge? :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
ju
Regular
Posts: 50
Joined: Wed Oct 01, 2008 4:27 pm

Re: How to remove image border

Post by ju »

I have a related problem. I always used to change

Code: Select all

style="float: left; border: 0px none; padding-left: 5px; padding-right: 5px;"
to

Code: Select all

style="float: left; border: 0px none; padding-left: 0px; padding-right: 10px;"
to have a clean line on the left and a little more space between the image and the text on the right side of it. That was easy to do, when style still was in the editor.

So, I guess, one possible solution would be to change serendipity_editor.js back to the old behaviour, als Garvin suggested. The other solution would be to change the css - but where and what? I am using bulletproof (blue) and I have no experience whatever with css.
ju
Regular
Posts: 50
Joined: Wed Oct 01, 2008 4:27 pm

Re: How to remove image border

Post by ju »

I had fixed my above mentioned problem somehow (unfortunately don't remember how), but after an upgrade in January I have had the same problem again for some weeks.

The thumbnails don't really fit into the layout because they don't align on the left and there is too little space between image and text. When I look into the HTML source there is no padding or anything else I could change to obtain the result I want. The code looks like:

<p> <a class="serendipity_image_link" title="PPRI" href="/uploads/20110322-catholics-marriage.png" target="_blank"><!-- s9ymdb:381 --><img width="91" height="110" class="serendipity_image_left" src="/uploads/20110322-catholics-marriage.serendipityThumb.png" title="(c) PPRI" alt="Haltung zur Ehe für gleichgeschlechtliche Paare nach Konfessionen" />

Which are the templates, css or whatever to insert padding? I'm using the Bullet Proof blue template.

//edit, update: ok, grep found this in style.css:

Code: Select all

/*** s9y image manager ***/
.serendipity_image_center {
    display: block;
    margin: 0 auto;
    padding: 0 5px;
}
.serendipity_image_left {
    padding: 0 5px 0 0!important;
}

.serendipity_image_right {
    padding: 0 0 0 5px!important;
}
I guess, it's not a good idea to edit this directly in style.css - can I overrule it somehow in my own stylesheet? And I am also not sure about the meaning of the digits (padding: 0 5px 0!important;) - when the image is on the left, left padding should be zero, right padding should be 10px.
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: How to remove image border

Post by yellowled »

ju wrote:I had fixed my above mentioned problem somehow
Erm ... did you reply in the correct thread? I can see not relation to the earlier thread posts?
ju wrote:The thumbnails don't really fit into the layout because they don't align on the left and there is too little space between image and text.
Please provide a URL to the blog if possible so we can see for ourselves.
ju wrote:When I look into the HTML source there is no padding or anything else I could change to obtain the result I want.
padding and similar stuff should be defined via CSS nowadays. :)
ju wrote:I guess, it's not a good idea to edit this directly in style.css - can I overrule it somehow in my own stylesheet? And I am also not sure about the meaning of the digits (padding: 0 5px 0!important;) - when the image is on the left, left padding should be zero, right padding should be 10px.
Yes, you can. Check the BP theme options for using a user stylesheet, set it to yes, create your own user.css and start editing. :) The style.css uses the shorthand notation for padding here.

YL
Post Reply