hi design,
I have experimented around with not much success:
.home #main .categories .category a:nth-child(4){
background: #ff0000;
}
<!--
.home #main .categories .category:nth-child(4) {
background: #ff0000;
}
The reason it doesn't really work properly is because past the second subcategory i can't seem to find any "class" to style. the first parent category is styled using h1 but subsequent subclasses irregardless of level all have the same style?
Samples of what i played with:
.category.cat_122 {
background: #ff0000;
}
.category:nth-child(2){
background: #ff0000;
}
.home #main .categories .category a:nth-child(4){
background: #ff0000;
}
}
.category:only-child(1){
background: #ff0000;
}
class[cat_*="*"] {
background: #ff0000;
}
i also tried n-child of col c1 and etc but no love.
The actual code on the website:
<div class="content home">
<div id="main">
<div class="categories c5">
<div class="col c1">
<div class="category">
<h1>
<ul>
<li>
<a class="category cat_122" href="
http://xxx/index.php?page=search&sCategory=122">WA</a>
<span>(5)</span>
<ul>
the only way i see is to style each category number indivdually which works but i might grow old doing this and its not dynamic, eg if the category number changes l'm out of luck.
This code currently works to style each individual category:
.category.cat_122 {
background: #ff0000;
}
but this is not feasible as i have so many categories and the numbers can change!!
Instead i need code to style category cat_* (whereby which i could possibly specify a range of numbers eg 50-100)
Any ideas?
Thanks guys