add this to the bottom:
Code: Select all
#category.middle a{
font-size: 8pt;
}
If you want different colors you can do
Code: Select all
#category.middle a{
color: red;
}
in the category module, that lists all the categories and sub-categories, i would like to display the sub-categories in a different font than the parent categories. e.g:
Fruit
> Apples
> Bananas
Flowers
> Daisies
> Geraniums
Here I would like 'Apples' 'Bananas' 'Daisies' and 'Geraiums' in one font, say 8 px, and 'Fruit' and 'Flowers' in a larger font, say 12 px.
Qphoria, your suggestions result in a uniform font size being applied to both parent and child categories - so not really useful to my problem.
How do i do this?
Code: Select all
if ($this->category_id == $result['category_id']) {
$output .= '<a href="' . $this->model_tool_seo_url->rewrite($this->url->http('product/category&path=' . $new_path)) . '"><b>' . $result['name'] . '</b></a>';
} else {
$output .= '<a href="' . $this->model_tool_seo_url->rewrite($this->url->http('product/category&path=' . $new_path)) . '">' . $result['name'] . '</a>';
}
Code: Select all
<a style="font-size: smaller; color: #FF0000;">
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Code: Select all
if ($parent_id > 0) {
$style = 'style="font-size: smaller; color: #FF0000;"';
}
Code: Select all
<a <?php if (isset($style)) { echo $style; } ?> href=
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
.box .middle ul li li
And applyIng the desired style.
(haven't tested)
www.opencartstore.com
Get OpenCart Templates and OpenCart Modules.
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Thanks Q, but it is actually wrong. Normally, it would be OK but, in this instance, it's not. The reason being, that it is actually called from inside a PHP variable declaration. The full line should read-Qphoria wrote:Looks ok to me.
Code: Select all
$output .= '<a ' . if (isset($style)) { echo $style; } . ' href="' . $this->model_tool_seo_url->rewrite($this->url->http('product/category&path=' . $new_path)) . '">' . $result['name'] . '</a>';
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Request Reviews v1.0 released.
however: how do i apply this to sub-sub categories ad infinitum?
right now this applies a style to only categories one level deeper than the main categories.
but i have say, 4 levels of nested categories - how do i style them all?
and if i click on a sub category, the sub category is bold but not the parent
how do i style it so that if i click a subcategory, BOTH sub and parent category are bold?
Users browsing this forum: No registered users and 16 guests