Jump to content

[Solved] How to change each text color under category block


Recommended Posts

Hello everyone,
I'm newbie for web developer and prestashop. I'm finding the way to change each text color under category block.
but I can't find the solution. I found only how to change catagory text color. I want to change "Laptops" into red color
Cloud you help me.

26710_0ohNLF5dhtSs4BQzfr0u_t

Link to comment
Share on other sites

So you want the Laptop category to have a different colour than the other categories? You'll need to change line 1 of modules/blockcategories/category-tree-branch.tpl from:




to:




You will then be able to use code like the following to global.css to make just to the Laptop category red:

div#categories_block_left ul.tree li.cat4 a { color: red }

  • Like 2
Link to comment
Share on other sites

  • 2 months later...

Hi Rocky - I'd like to do this, oinly changing background colour - Can't find the statement to change in file though - I seem to have a different blockcategories.tpl


       {foreach from=$blockCategTree.children item=child name=blockCategTree}
           {if $smarty.foreach.blockCategTree.last}
                       {include file=$branche_tpl_path node=$child last='true'}
           {else}
                       {include file=$branche_tpl_path node=$child}
           {/if}
       {/foreach}




What do I change here?
Thanks

Baz

Link to comment
Share on other sites

Hi Rocky - thanks - have found and changed - tried editing global.css as you suggested - but doesn't seem to change block colour around links.

My css file re this menu is :

/* Block categories */
div#categories_block_left ul.tree { padding-left: 0.5em }
div#categories_block_left ul.tree li {
   border: none;
   padding-top: 5px;
   padding-left: 15px;
   background: none;
   margin-left: 0;
   font-weight: bold;
   font-size: 13px;
   line-height: 13px
}
div#categories_block_left ul.tree li.last { padding-bottom: 0 }
div#categories_block_left ul.tree li ul { padding: 2px 0 0 }
div#categories_block_left ul.tree li ul li {
   padding: 1px 0 1px 15px;
   background: none;
   font-size: 11px;
   font-weight: normal
}
div#categories_block_left ul.tree li ul li.last { padding-bottom: 0 }
div#categories_block_left ul.tree li ul li ul li {
   padding-left: 15px;
   font-size: 9px
}
div#categories_block_left ul.tree a {
   padding-left: 0;
   color: #374853
}
div#categories_block_left ul.tree a:hover { text-decoration: none; color: #ff7e00; }
div#categories_block_left ul.tree a.selected {
   color: #fc0404;
   font-weight: bold
}
div#categories_block_left span.grower {
   display: block;
   float: left;
   background-position: 0 3px;
   background-repeat: no-repeat;
   width: 9px;
   height: 15px;
   margin: 0 0 0 -12px!important;
   margin: 0 0 0 -8px;
   padding: 0
}
div#categories_block_left span.OPEN { background-image: url('../img/icon/less.gif') }
div#categories_block_left span.CLOSE { background-image: url('../img/icon/more.gif') }




Any ide what I should change?

Thanks

Link to comment
Share on other sites

That code is to edit the category text colour only. The category block inherits its block style from the /* Default block style */ section on line 829 (in PrestaShop v1.3.1) of global.css.

If you want to style just the background of the category block, you will need to add a block like the following to global.css:

div#categories_block_left
{
  ...
}
div#categories_block_left h4
{
  ...
}

Link to comment
Share on other sites

  • 2 weeks later...
So you want the Laptop category to have a different colour than the other categories? You'll need to change line 1 of modules/blockcategories/category-tree-branch.tpl from:




to:




You will then be able to use code like the following to global.css to make just to the Laptop category red:

div#categories_block_left ul.tree li.cat4 a { color: red }




works well, but to change the color of a subcategory, what changes should be done?
Link to comment
Share on other sites

  • 5 months later...
  • 1 year later...

So you want the Laptop category to have a different colour than the other categories? You'll need to change line 1 of modules/blockcategories/category-tree-branch.tpl from:

 

[list]
[*]

 

to:

 

[/list]

 

You will then be able to use code like the following to global.css to make just to the Laptop category red:

 

div#categories_block_left ul.tree li.cat4 a { color: red }

 

 

 

hi Rocky, the code you mentioned is not showing, would you like to have look at what the problem is ? thanks a lot !

Link to comment
Share on other sites

  • 1 month later...

This doesn't work in version 1.5, I think. What I need to do is change the size of the category family of branches. If I have a category Collection with 3 or 4 branches, I whant the word Collection to be 13px, but not the branches.

 

Can anyone help me do this?

Link to comment
Share on other sites

This doesn't work in version 1.5, I think. What I need to do is change the size of the category family of branches. If I have a category Collection with 3 or 4 branches, I whant the word Collection to be 13px, but not the branches.

 

Can anyone help me do this?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...