Home Forums Basel support forum Apply a css code only on home page

Apply a css code only on home page

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #14198

    wantons
    Participant

    hello!

    how can i apply a css code only on my home page?
    i mean, is it something like this?

    .home{
    MY CSS CODES
    }

    Thanks.

    #14203

    Artem Temos
    Keymaster

    Hi,

    We suggest you to add custom CSS styles to a particular page with Visual Composer. Find a gear icon in the backend editor and add your code there.

    Regards

    #14408

    wantons
    Participant

    yes that’s a great idea. but i need to add my css in custom css section cause in some cases i need to add different css for different devices. please tell me how can i apply a css code on a special page by a page id ( for example my homepage ID is 7 )
    Thanks.

    #14412

    Artem Temos
    Keymaster

    Then, you can use page-id-7 class added to the body. See screenshot

    Regards

    #14413

    wantons
    Participant

    im sorry, but i don’t understand what is the point of the screenshot 🙁

    you mean something like this?

    .page-id-7{
    MY CSS CODE
    }

    #14416

    Artem Temos
    Keymaster

    Yes, you can use this class to apply your styles for that page only.

Viewing 6 posts - 1 through 6 (of 6 total)