I ran across a problem with defining CSS yesterday which I have been unable to solve:
My site is using various templates. It's a writing-oriented site, which means that users can upload their scripts, poetry or other stuff (I'll publicly unveil it soon). In fiction writing there are several formatting conventions that are used, and I'm using templates to cover this. The basic structure is that selecting the right template pastes a div section into the document which invokes a specific CSS class.
Here's an example:
[[div class="fiction"]]
Put your text here
[[/div]]
This invokes a piece of css, as follows:
.fiction
{
width: 470px;
text-indent:30px;
font-family: "Times";
font-size: 12pt;
text-align:justify;
}
.fiction li
{
text-indent: 0px;
line-height: 16pt;
}
.fiction p
{
line-height: 16pt;
}
All of this works well. However, I tried to include some css for headers as well:
.fiction h1, h2, h3, h4, h5, h6
{
margin-bottom:0px;
}
This didn't really work. What happened (especially when I had several such sections in) was that wikidot seemed to be paying attention to only the last heading styles, and then applying them globally. This was particularly noticeable when I included a heading style for a screenplay-style template with a font-family set to Courier. The result was that the whole page, the sidebar and so forth turned all of its headings to Courier despite this property being clearly defined as only a class property.
Is there a reason why this is happening, or is it just a bug in the way that wikidot interprets css for headers?





