bertassa
bertassa

Reputation: 685

Hide div on WordPress specific page

I want to hide a div on a specific WordPress page by overriding the original CSS. This is my code:

   body.page-id-7 #thumbnails .controls { display: none !important; }

However this does not work. #thumbnails is the id of a Div which contains another div with the class "controls". Any idea why this does not work. The page I am looking at is http://who.designbond.co.uk/ and I want to hide the arrows at the bottom right of that specific page. Thanks in advance for your help.

Upvotes: 0

Views: 6497

Answers (3)

ralph.m
ralph.m

Reputation: 14365

If it's the home page you want to hide this on, this should be enough:

.home .controls {display: none;}

The home page body element doesn't have a class of page-id-7, though, so I wonder if I'm looking at the right page?

Upvotes: 1

Sergio
Sergio

Reputation: 28845

add to CSS .rel .controls {display: none;}

Upvotes: 0

bertassa
bertassa

Reputation: 685

This is the correct code:

 body.home.fullsize-gallery #thumbnails .controls { display: none !important; }

I was referencing the page by its id, whereas I should have referenced the page by its post name, that is "home".

Upvotes: 0

Related Questions