Hi
How can I remove scroll bars on pages where there is no need for them?
When I change the following css it works but causes problems in galleries etc:
html.show-scroll body { overflow-y: auto; }
Have a look at the attached screen cap of the scroll bars in question.
Comments
Different pages have different classes in
body
element, but this is unfortunately set inhtml
element.So there is no solution I could think of, that will be safe always rather then keep them active.
With kind regards.
Here is how I did it:
Edit the Thirteen: Header (header.php) file.
Add this code after
And replace present
<body>
tag code:<body id="top" <?php body_class(); ?>>
with...
<body id="<?php echo $page ?>" <?php body_class(); ?>>
And that's it. Now you have a unique ID code for each page that you can target :-)
To remove scroll bars from my main index page which is called id="default" I used this in the custome CSS section:
html
element, but it is not. It is onbody
.In that case you don't need your modification at all, cause each page already has unique class for each page, like page-id-225. Check
body
elements classes for this.What is more there are even special classes that we have added, that allow you to do it in more general way, as there are many unique classes in
body
element.To disable scroll bars on slider album you can use this custom CSS alone: If you need it in other places then I can help you get it.
Sorry for extra work, but thanks for making me realize that!
With kind regards.
Thanks for taking the time and re-looking at it. But I have tried your way and it does not work 100%.
Your way causes problems with image spacing in albums. Have a look at the attached image.
With kind regards.