changing background color of home page only in Selene wordpress theme (1 post)

  1. Ravi-wpuser
    Posted 2 years ago #

    I have to change the background color of 'home page and its text' in a website based on Selene wordpress theme. Currently, I can do this through page-id of home page in following way from style.css:

    /*home page background color*/
    .page-id-18 #container {
         background: #000000 !important;
    /*home page text color*/
    .page-id-18 h2 {
         color: #000000 !important;

    Is it right to do or there is other way? Also I have heard that using !important property should be avoided, is it wrong then?

Topic Closed

This topic has been closed to new replies.

About this Topic