Topic: How To Change the admin style sheet?

Hi,

I am new to PunBB and was wondering how I can change the style sheet for the admin interface???
Or is there a tutorial somewhere?

Thanks!
Dada

Re: How To Change the admin style sheet?

There's no way to change the style for just the admin interface

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

Re: How To Change the admin style sheet?

Smartys, could you not put the CSS code on the .tpl file and add !important at the end of each css line?
I think that should work.

4

Re: How To Change the admin style sheet?

Zimmer92 wrote:

Smartys, could you not put the CSS code on the .tpl file and add !important at the end of each css line?
I think that should work.

Why? So IE may ignore it?

5 (edited by Zimmer92 2007-01-18 16:59)

Re: How To Change the admin style sheet?

Why would IE ignore it?
!important in CSS just means that that code will overwrite the code in the css file for that specific template.
That is how I made a custom Vbulletin style because of the restrictions of style designing in it.
So I just added in the "extra css board" all the code I wanted, added "!important" after it and it overwrote all the css code before it, so i could do as much as I wanted. It works.

Also, if you use !important in a css style for something then you can overwrite some settings that are default. For example, I have on my css code

h2 {
margin-top: 15px !important;
}

6

Re: How To Change the admin style sheet?

IE has a bug in the way it handles !mportant which means it can be used as a hack.

{color: red !important;
color: blue}

IE would get blue and firefox etc would get red.

All admin pages have a wrapper with the id #punadmin. If you use the id as a prefix to all your style declarions then they will only apply to the admin pages.

And why bother with !important, a style block in the tpl file will take precedence over the stylesheet anyway.

Re: How To Change the admin style sheet?

Well, so far the !important works for me.
As a hack you say? What do you mean by that?

8

Re: How To Change the admin style sheet?

Zimmer92 wrote:

Well, so far the !important works for me.
As a hack you say? What do you mean by that?

Just look at what he said.

IE ignores all values with !important, so with this code, { color: red !important; color: blue }, IE would display blue color while any other browser would display the text in red.

Do you understand now? If you still don't understand, read this:

A common misconception is that IE6 (and earlier) does not pay attention to !important rules in CSS. The truth is that this is true only part of the time. (Theoretically IE7 should get it right, and I really hope it does, but who knows any more... someone care to test?)

For those that need a quick refresher, what the !important declaration does is increase the specificity of the rule to a level above that even of inline styles and more specific selectors, or those that come later in the stylesheet.

(http://modxcms.com/css-hacking-important.html)

Re: How To Change the admin style sheet?

Well it doesnt on my forums. hmm

10

Re: How To Change the admin style sheet?

Zimmer92 wrote:

Well it doesnt on my forums. hmm

Then you're either not viewing it in IE, or both values are the same (i.e: { color: red !important; color: red } ).

Re: How To Change the admin style sheet?

Nope, i use all web browsers for designing sites and in IE it shows up perfectly. hmm
Both values are not the same, as it is overwriting a BASE.CSS css code.

12

Re: How To Change the admin style sheet?

You are still missing the point. If you put a style block in the template that will will overrule the stylesheet anyway, you don't need !important. The only reason you needed it in vBulletin is because vB uses stye blocks in the template rather than just having separate stylesheets.

Re: How To Change the admin style sheet?

But I am not talking about Vb on this occassion, I am talking about PunBB. hmm

14

Re: How To Change the admin style sheet?

Zimmer92 wrote:

Why would IE ignore it?
!important in CSS just means that that code will overwrite the code in the css file for that specific template.
That is how I made a custom Vbulletin style because of the restrictions of style designing in it.
So I just added in the "extra css board" all the code I wanted, added "!important" after it and it overwrote all the css code before it, so i could do as much as I wanted. It works.

You said you were employing the same technique as you use for vB which you don't need to becuase PunBB doesn't use style blocks.