Apply a css code only on home page
-
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.
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
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.
Then, you can use page-id-7
class added to the body. See screenshot

Regards
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
}
Yes, you can use this class to apply your styles for that page only.