0

我在 magento (tintinportintin.com.br) 有一家商店,我想自定义类别页面,为每个类别页面添加特定颜色。例如,我希望相同的主页菜单和所有页面在类别 x 中为蓝色,在类别 y 中为红色。谁能帮我?

4

3 回答 3

0

我商店中的 style.css 指的是#nav

   /* Classes specifying background and other settings for navigation bar */
.navbar {
    background-position:top left;
    background-repeat:repeat-x;
    float:left;
    width:944px; /* 944 = 960 - 2*8 */
    height:41px;
    padding-top:10px;
}
.navbar-left {
    background-position:0 -51px;
    width:8px;
    height:51px;
    float:left;
}
.navbar-right {
    background-position:100% -51px;
    width:8px;
    height:51px;
    float:left;
}
于 2013-02-10T21:34:59.670 回答
0

我的 style.css 指的是导航背景:

.categorypath-colares-html #nav{
   background-color: #b7ea2c;
background:url(../images/img/navbar-lightgreen.png) no-repeat; 
}

.categorypath-colares-html #nav a{
   color:#b7ea2c;
}
于 2013-02-11T09:47:54.423 回答
0

html body 标记包含每个类别的类名,因此一种非编程方式可以做到这一点,就是使用 css。

<body class=" catalog-category-view categorypath-pulseiras-casual-html category-casual">

<body class=" catalog-category-view categorypath-colares-html category-colares">

所以在你的 style.css 中(你可以添加到最后)

.categorypath-colares-html #nav{
   background-color: black;
}

.categorypath-colares-html #nav a{
   color:red;
}

.categorypath-pulseiras-casual-html #nav a{
   color:blue;
}

.categorypath-pulseiras-casual-html #nav{
   background-color: black;
}

(唯一的限制是如果您更改类别名称,那么您将需要更新 css)

于 2013-01-06T16:36:16.317 回答