Hi Stella, I have been having a problem setting the font size of the descriptions of subcategories, and its probably my lack of CSS knowledge

On this page http://www.crydee.com/faq you will notice further down the list I have sub-categories eg "Riftwar Saga" as you will notice (IE7) the font for "Riftwar Saga" is larger than the parent category. The same occurs with the description.

When I have tried to change the font size for the description, I also affect the font size for the description when it is displayed on the sub-page linked from Riftwar Saga.

Could you please point me in the right direction

Comments

Anonymous’s picture

Version: 6.x-1.8 » 6.x-1.x-dev

Wrong version - latest dev

stella’s picture

I presume you're using the category display option which opens a new page when the link is clicked, and ditto for the question listing.

The category descriptions are all within a div with the class name faq-qa-description. For the category listing you've chosen, each category name is an item in an unordered list. So the top level parent category could probably be themed with a section in your css code like:

div.faq div.item-list ul li {
}

For the first level of sub-categories it probably would be:

div.faq div.item-list ul li div.item-list ul li {
}

And so on.

The faq-qa-description div is within the li, so it could be themed with:

div.faq div.item-list ul li div.faq-qa-description {
}

I haven't tested the above though, but I think it should work.

Cheers,
Stella

Anonymous’s picture

Hi Stella,

Many thanks for the reply. The way you have explained it has helped me get my head around something i have been struggling to understand for some time now. I had been using insufficient elements in the CSS to tie me down to what i needed, I assume I can probably merge some of teh settings, but for now i can see exactly what does what. So i am almost there :)

Your assumption on my configuration is correct

Whilst playing with CSS trying to change various aspects i have encountered some oddities

1 When I open the category in a new page I was getting extra space between the title and faq-qa-header faq-qa-description It wasnt till after i tried theming it, that I noticed a

<br />

between

<div class="faq">

and

<div class="faq-category-group">

looking at the code in faq.module line 417 there was the "br", removal of the tag eliminated most of the gap, though there is still a subtle difference between the main FAQ page - Not sure if this is a bug, and what other effects it might have, or is there a better way of dealing with this

2. I have also been noticing a large gap between the list of categories, again looking at the code the common point was

<div class="clear-block"></div>

Removing the code from line 883 of the faq.module resolved the issue, in fact it almost halved the page length - Again not sure if this is a bug, and what other effects it might have, or is there a better way of dealing with this

3. No idea whats happening here but having used your, suggestions above I have been able to target each element of the display, but with one oddity. Bearing in mind that the CSS has been added at the bottom of style.css, the only way i have been able to get both Category and Subcategory to be visually the same size is to have different font size (IE7)

/**Category on main page**/
div.faq div.item-list ul li {
font-size: 1.1em;
}

/**Sub category on main page**/
div.faq div.item-list ul li div.item-list ul li {
font-size: 1.0em;
}

If I set both to 1.1 the the sub-category appears larger. Any ideas what could be causing this ?

4. If i have a description for my category I am seeing the following, extra set of "p" tags, Not sure if this is a problem, They are not evident in the term_data table so are coming from somwhere

<div class="faq-qa-description"><p><p>My Description</p></p></div>

Other than that , I think everything is now perfect :)

regards
John

stella’s picture

Status: Active » Fixed

Item 1 - fixed
Item 2 - this is needed for taxonomy terms that have images associated with them, but I've tweaked it, so it should appear okay for you now.
Item 3 - I think this is a conflict with another CSS file on your site; doesn't happen for me on a clean install with garland theme.
Item 4 - fixed

This will be included in the next dev release, available later today.

Cheers,
Stella

Anonymous’s picture

Hi Stella,

Just updated the faq.module, and all is working well. I will look into the CSS issue in 3, and if i can find the cause will report back

regards
John

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Rosamunda’s picture

Hi there!
In my case it worked only with .faq h5 {} for category titles.

stella’s picture

Released in faq 6.x-1.9.