Home › Forums › Support › Adding CSS to hook This topic has 7 replies, 2 voices, and was last updated 3 years, 5 months ago by Leo. Viewing 8 posts - 1 through 8 (of 8 total) Author Posts November 9, 2022 at 12:28 pm #2408811 Charles Hi there, I’m looking to make a few adjustments to a banner ad I’ve just added to my website via the generate_after_header hook. I would like to disable the ad on desktop, center align and add some padding at the top. If you could help that would be great. Charles November 9, 2022 at 1:03 pm #2408831 LeoStaff Customer Support Hi Charles, CSS should be added using one of the methods here and not through a GP hook: https://docs.generatepress.com/article/adding-css/ The Additional CSS field is a WP core option so that would be my recommendation unless you are using a child theme already. November 9, 2022 at 1:34 pm #2408857 Charles Hi Leo, Thanks for the advice. Do I need to give the hook a class and what CSS would I use to make the above changes? Charles November 9, 2022 at 1:37 pm #2408862 LeoStaff Customer Support I don’t see a class for the ad so a class would certainly be helpful. November 9, 2022 at 1:50 pm #2408876 Charles Hi Leo, I’ve added a class and made a couple of changes to the ad. However, I’m unsure how to disable on desktop? Charles November 9, 2022 at 1:52 pm #2408878 LeoStaff Customer Support You would just need to display: none; on the desktop breakpoint: https://docs.generatepress.com/article/responsive-display/ November 9, 2022 at 2:05 pm #2408898 Charles Great, thanks Leo Charles November 9, 2022 at 3:35 pm #2408983 LeoStaff Customer Support No problem 🙂 Author Posts Viewing 8 posts - 1 through 8 (of 8 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In