Does anyone know how I can get a specific category to be styled? For instance, I have a CLEARANCE category that I would like in bold red. I don't see how I can add a style to that category.
Last edited by i2Paq on Fri Aug 20, 2010 4:21 pm, edited 1 time in total.
Reason: Topic moved
Reason: Topic moved
Open
find
around line 50 and change it to
then for say category 20, in your stylesheet use the selector
Code: Select all
/catalog/controller/module/category.php
Code: Select all
$output .= '<li>';
Code: Select all
$output .= '<li id="category-'.$result['category_id'].'">';
Code: Select all
#category-20 {
/* STYLE INFO HERE */
}
Just use a child selector via css
http://www.w3.org/TR/CSS2/selector.html#child-selectors
for example, in the default theme, use
which will only style the first level category list items, not their descendants.
http://www.w3.org/TR/CSS2/selector.html#child-selectors
for example, in the default theme, use
Code: Select all
#category > ul > li
Not sure then with your stuff, but for example, on the category you can use
and get this result
http://screenshots.jaygilford.com/2010-08-24_1425.png
If you want to edit the link tags, you need to use
Code: Select all
#category > ul > li {
border: 1px solid black;
}
http://screenshots.jaygilford.com/2010-08-24_1425.png
If you want to edit the link tags, you need to use
Code: Select all
#category > ul > li > a
Thank you Jay!
I used this code to make the parent category text to bold:
I used this code to make the parent category text to bold:
Code: Select all
#category > ul > li > a {
font-weight:bold;
}
I editted this line in my controller
and build in my CSS
ect, etc. for the next categories
but my problem is that the image in front of my text is not centered
I also tried
but then the image is in my text.
does anyone have a solution to this problem
Code: Select all
$output .= '<li id="category-'. $result['category_id'].'">';
Code: Select all
#category-21 {
list-style: url('../image/twee.png');
list-style-position:outside;
}
#category-21 li {
background:#e9b447;
}
but my problem is that the image in front of my text is not centered
I also tried
Code: Select all
#category-20 {
background: url('../image/een.png') center left no-repeat;
}
does anyone have a solution to this problem
Who is online
Users browsing this forum: No registered users and 15 guests