Welcome to WebmasterWorld Guest from 34.236.190.216

Forum Moderators: not2easy

Message Too Old, No Replies

.page-id for body does not work

     
9:58 am on Oct 1, 2017 (gmt 0)

New User

joined:Oct 1, 2017
posts: 2
votes: 0


Hello, I have a problem with .page-id. I does not work for body of my page.

I'm trying set no-scroll only for one page. When I use.
body {
overflow: hidden;
}
it will diable scrolling on all pages.

So, I was thinking to use page-id like so:
.page-id-538 body {
overflow: hidden;
} /* home */

.page-id-627 body {
overflow: hidden;
} /* o mne;*/

.page-id-656 body {
overflow: hidden;
} /* projekty */


But it does not work. It's strange because, for example:
.page-id-538 header {
position: fixed;
} /* home */
works just fine.


Any ideas?

[edited by: engine at 8:32 am (utc) on Oct 3, 2017]
[edit reason] Please see WebmasterWorld TOS [/edit]

6:45 pm on Oct 9, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 15, 2003
posts:958
votes: 33


You'll have to show us the HTML for the page - at least the <body> tag to suggest corrections. Specifically, we'd need to know which tag on the page has the class name 'page-id-xxx'.
7:24 pm on Oct 9, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member Top Contributors Of The Month

joined:Apr 1, 2016
posts:2662
votes: 793


Just guessing (without HTML) but you may want to try body.page-id-XXX instead of .page-id-XXX body.

Also Welcome to Webmaster World!
6:11 am on Oct 10, 2017 (gmt 0)

New User

joined:Oct 1, 2017
posts: 2
votes: 0


Ohh thanks so much NickMNS. And yeah, it works! Great!