Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
pn-normal & pn-title, Short and Sweet
  • Posted: 24.04.2003, 17:03
     
    pptous
    rank:
    Softmore Softmore
    registered:
     June 2002
    Status:
    offline
    last visit:
    24.01.08
    Posts:
    51
    Hi PNers

    OK, its time I really find out about the PN classes PN-normal & PN-title. Where can we define these classes? Can we move these classes to the .css so we have everything in one place?

    Thanks for your help.

    Pepe
  • Posted: 24.04.2003, 20:41
     
    msandersen
    rank:
    Professional Professional
    registered:
     August 2002
    Status:
    offline
    last visit:
    25.11.05
    Posts:
    994
    They're defined in the main style sheets, styleNN.css and style.css.
    The latter is there for styles Netscape 4 shouldn't read, due to it being antequated and buggy.

    Use styleNN.css as your main stylesheet, and avoid duplicating across the two. Just put things like padding and margin in thesecond one that's not applied to objects like tables, as it can mess up NN4.

    You could look at the stylesheets in these two themes:
    PostNuke-V.zip
    PostNukeBlue100.zip

    The styles used in PostNuke aren't defined anywhere else but here. But they're used everywhere, so changing it one place may affect the whole site.
  • Posted: 25.04.2003, 00:26
     
    pptous
    rank:
    Softmore Softmore
    registered:
     June 2002
    Status:
    offline
    last visit:
    24.01.08
    Posts:
    51
    Yeah, being an avid .css lover I would have gave the same answer msandersen. But I am afraid I am still baffled. Let's take the good old PostNukeBlue theme. There isn't any PN-normal or PN-title in the .css. But in just about every PN script there is a class called PN-normal and PN-title. When I added to the PostNukeBlue theme's .css PN-normal and PN-title nothing happened. I remember reading that these were defined somewhere else in PN but this sounds really not very logical.

    I must be something here!

    Pepe
  • Posted: 26.04.2003, 01:38
     
    msandersen
    rank:
    Professional Professional
    registered:
     August 2002
    Status:
    offline
    last visit:
    25.11.05
    Posts:
    994
    No, look at the browser source code, only those two stylesheets are used. I had a look at the PN sourcecode and it's not defined anywhere else.

    The problem is the style may often be overriden by more specific styles. They tend to define not just BODY, but TD, FONT, P, DIV, etc, so sometimes it's hard to target something specific. The PN-normal style doesn't need to be set, really, as these tags have already been set and will default to it. In the theme you can wrap your own custom style around something. You have to set a more specific style like

    INPUT.pn-normal {
    color: #333333;
    background-color: #767C74; /* color of submit button */
    border-color:#7d7d7d;
    padding: 0px 5px;
    margin: 0px;
    }

    Because the PN-normal styles are so generic throughout the site, to target something like the news title links, you'd wrap a SPAN around the
    $preformat['catandtitle'];

    Code

    <span class="storytitle"><nobr><?PHP echo $preformat['catandtitle'] ?></nobr></span></td>


    and do a style like this:

    Code

    /* News title links */
    span.storytitle a:link,
    span.storytitle a:visited { COLOR: black; /* #333333 */ }
    span.storytitle a:hover,
    span.storytitle a:active  { COLOR: #205CC8; }


    Look at the browser source where you want to change something, see where the PN-normal style is. If there's other tags like A or TD after it, its styling will override PN-normal unless you do like above. More specific rules have precedence.

    Or you can comment out some of those Tag definitions and see what happens, say the TD rule which would style all table cells, where the BODY style ought to cover it.

    Martin :D

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula