Forum Moderators: not2easy

Message Too Old, No Replies

.page-id for body does not work

         

rukay

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

5+ Year Member



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]

rainborick

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

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



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'.

NickMNS

7:24 pm on Oct 9, 2017 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



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!

rukay

6:11 am on Oct 10, 2017 (gmt 0)

5+ Year Member



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