CSS Element Not working on Carl02

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
TKS
Regular
Posts: 199
Joined: Thu Nov 11, 2004 1:34 am
Location: VA, USA
Contact:

CSS Element Not working on Carl02

Post by TKS »

http://linux-blog.org/index.php?/archiv ... ricks.html

On that page, I've got overflow of my code elements. I've changed things in the CSS for Carl02's style to have scrollbars but they're not appearing.

Code: Select all

code {display:block; font-size:0.7em; background-color:#f8f6f6; overflow:auto;
	font-weight:bold; border:1px solid #efefef;padding:4px; }
Any ideas? Upon looking at source for the page, I find that it's calling the class bb-code. I can't find that class. Am I changing things in the wrong place?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: CSS Element Not working on Carl02

Post by garvinhicking »

Hi!

the bb code snippet comes from the serendipity_event_bbcode plugin which has its own style. You could copy+paste the output of your current CSS sheet and then put those bb-code classes into your style.css file, which will then make the plugin no longer emit its default styles.

You can then fill your customizations into your style.css, where they should take effect. Right now those are overwritten with the bb code snippets frmo the plugin, because they are more specific than a global "code" element. In CSS, a specifically named element always has precendence over a "global" declaration.

HTH,
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/
TKS
Regular
Posts: 199
Joined: Thu Nov 11, 2004 1:34 am
Location: VA, USA
Contact:

Post by TKS »

Cool,

That's easy enough...Thanks for the info Garvin!
TKS
Regular
Posts: 199
Joined: Thu Nov 11, 2004 1:34 am
Location: VA, USA
Contact:

Post by TKS »

Ok Garvin...just wanted to post this here as successful:

Opened up /plugins/serendipity_event_bbcode/serendipity_event_bbcode.php

Inside I found this:

Code: Select all

.bb-code, .bb-php, .bb-code-title, .bb-php-title {
    margin-left: 20px;
    margin-right: 20px;
    color: black;
    direction: ltr;
}
At the bottom of the file.

I added:

Code: Select all

    overflow:auto
And it was fixed. Of course, to future proof this I'd have to add this style to to my template style.css and it would override as Garvin said...but if I change templates I'd have to make edits inside the style.css of the new template and I wasn't about to try and remember that.

So, I changed it inside the event plugin file and now I only have to remember to change it anytime the bbcode plugin is updated.

Thanks again Garvin
Post Reply