Not logged in. · Lost password · Register
Forum: General Help and Support Templates and Layout RSS
Headings with the word "Content" are formatted oddly
Avatar
rcargo #1
Member since Mar 2007 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: Headings with the word "Content" are formatted oddly
Part of our wiki is a glossary of web terminology, with terms shown as headings (H5) and their definitions shown as plain text below. However, when a heading is made for the term "Content", it no longer formats the word "Content" as a normal H5 heading. Instead the word "Content" is indented, the usual horizontal rule line beneath is omitted, and a partial box around "Content" is drawn. On the bright side, the font used to display "Content" is the correct H5 font. The same problem happens when trying H3, H4, and H6 for the word "Content", (indented, no horizontal line, and partial box, but correct font.)

We are using the MonoBook template and the word "Content" seems to be the only word that produces such an effect. Any ideas?!

Thanks,
-Ryan
pk (Former member) #2
No profile available.
Link to this post
That's because the monobook template uses ids named "content" to format parts of the document. See

lib/tpl/monobook/monobook/main.css, Line 18:

#content {
    margin: 2.8em 0 0 12.2em;
    padding: 0 1em 1.5em 1em;
    background: white;
    color: black;
    border: 1px solid #aaa;
    border-right: none;
    line-height: 1.5em;
    position: relative;
    z-index: 2;
}

A quick hack could be:

1.) Change the above part to

div.content {
    margin: 2.8em 0 0 12.2em;
    padding: 0 1em 1.5em 1em;
    background: white;
    color: black;
    border: 1px solid #aaa;
    border-right: none;
    line-height: 1.5em;
    position: relative;
    z-index: 2;
}

2.) Open the file

lib/tpl/monobook/main.php, Line 57:

<div id="content">

Change that to

<div class="content">

But monobook is a complex layout, that may affect other parts I'm not aware of at the moment. At least now you got an idea what's the reason for this behavior. Good luck ;).
Avatar
andi (Administrator) #3
User title: splitbrain
Member since May 2006 · 3303 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Template authors should always make sure used ID's won't clash with headline IDs. This is explained at http://wiki.splitbrain.org/wiki:devel:javascript#using_ids but I'll add the info to http://wiki.splitbrain.org/wiki:devel:css as well. Please report this problem to the temlate author.
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
rcargo #4
Member since Mar 2007 · 2 posts
Group memberships: Members
Show profile · Link to this post
Pk & andi,

Many thanks, we'll try that out and also let the template author know about that change.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2018-06-21, 12:01:07 (UTC +02:00)