a simple question about page-specific css
-
Hello guys, I am a newbie to css. I made this for a page of my website. But it looks quite redundant. Can you help me to shorten it? Thank you.
.page-id-1407 #top-wrapper { display: none; } .page-id-1407 #main-menu { display: none; } .page-id-1407 #page-content-title { display: none; } .page-id-1407 #page-content {background: none;} .page-id-1407 #feedback { display: none;} .page-id-1407 #page-peel { display: none;} .page-id-1407 #footer-bg { display: none;} .page-id-1407 .back-to-top { display: none ; } -
You did not specify a blog address or reason for posting when you created this topic.
This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.
If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.
If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.
This is an automated message.
-
Can you please give us the URL for the site you are talking about please? The one linked to your username appears to have not been updated since 2010.
-
The only thing I can see doing with that set of CSS to shorten it would be to put all the selectors in one and reference “display:none” once like this:
.page-id-1407 #top-wrapper, .page-id-1407 #main-menu, .page-id-1407 #page-content-title, .page-id-1407 #page-content, .page-id-1407 #feedback, .page-id-1407 #page-peel, .page-id-1407 .back-to-top { display: none ; }If you wanted to apply “display:none” to every one of those, then you’d have to keep each selector.
Please note that WordPress.com does require keeping footer credits in tact. However, your CSS doesn’t appear to be for a WordPress.com blog (that I can tell), and this forum is for WordPress.com blogs. You should absolutely include the link to the WordPress.com blog you’re working with when you ask for help here.
- The topic ‘a simple question about page-specific css’ is closed to new replies.