Site logo

Archived topic

Category Box and Background Color

8 replies · Started by Rohith on August 26, 2022

Viewing posts 1–9 of 9

Hi there, how to add a box and background color to the entire category page's heading and description?

Hi Rohith,

Try this CSS:

.archive.category header.page-header {
    background-color: blue;
    padding: 20px;
}

Try change the CSS to:

.archive.category header.page-header .page-title {
    border-bottom: 5px solid grey;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
}
.archive.category header.page-header {
    background-color: #ededed;
    padding: 20px;
    border-radius: 10px;
    border: 5px solid grey;
}

It worked but how to change the Category heading size in mobile?

The setting is at customizer > typography > Heading 1 (H1), click the mobile icon, and you will be able to set its font size for mobile.

1. If I Increase it then it is going to change every H1 Tag in the site. So, please provide some css only for H1 Size in Category and in mobile
2. Is it possible to change only the background color of the Category name (Check PVT)

Hello Anyone please reply?

Hi there,

remove the CSS you have so far.
And add this:

.archive.category header.page-header .page-title {
    padding: 20px;
    border: 1px solid #222;
    background-color: #222;
    color: #fff;
    margin-bottom: 0;
}
.archive.category header.page-header .taxonomy-description {
    padding: 20px;
    border: 1px solid #222;
    background-color: #efefef;
}
@media(max-width: 768px) {
    .archive.category header.page-header .page-title {
        font-size: 27px
    }
}
This archived topic is closed to new replies.