This:
html .page-template-showreel-php {
overflow: hidden;
}
…will target body.page-template-showreel-php
. So, two questions:
- Do you have the
<?php body_class(); ?>
template tag inside of the<body>
HTML tag? - Is hiding overflow on the
<body>
tag really what you’re after, or do you need to target a descendant element?
EDIT
There is no semantic or programmatic reason that you can’t re-use the <?php body_class(); ?>
template tag inside the <html>
tag also. So, you might consider:
<html <?php body_class(); ?>>
and then:
html.page-template-showreel-php {
overflow: hidden;
}
Worth a shot…
Related Posts:
- Is it possible to enqueue a raw CSS string directly from within a template file?
- How do I style WordPress pages differently based on the tag used?
- Inconsistent `body_class()` function
- How to create a custom CSS class for a specific page template?
- Getting page output HTML without request (for CriticalCSS, PurgeCSS)
- post_class not working with css
- Making a
- How to change the color of an svg element?
- How to implement max-font-size?
- @Media min-width & max-width
- How do I center this form in css?
- How can I replace text with CSS?
- Bootstrap 4, How do I center-align a button?
- How do I horizontally center a span element inside a div
- What does an asterisk (*) do in a CSS selector?
- height style property doesn’t work in div elements
- Text not wrapping inside a div element
- combined multiple classes into one css rule
- CSS Outside Border
- CSS not working in Chrome
- CSS3 opacity gradient?
- use multiple css filters at the same time?
- How can I make my header image properly responsive?
- CSS fixed width in a span
- Adding border to CSS triangle [duplicate]
- How to enqueue style before style.css
- Remove wp_add_inline_style
- WordPress Register Style Called Incorrectly
- wp_enqueue_script + how to load JS or CSS in one URL merge call?
- Duplicate and alter sidebar for Twenty Eleven
- Dequeue theme stylesheets but keep widget styling on custom page template
- How to dequeue styles coming from plugins?
- How to set different font family based on text language?
- How to exclude certain code from style.css? [closed]
- Creating new templates in child themes breaks layout
- Need Help Figuring Out Admin Menu Hover Styling Class
- whats happening with my index page?
- How do I add an indicator to my .menu-item if it contains a .sub-menu?
- Change via CSS the color of social menu icons
- Header’s CSS doesn’t work in Chrome and Opera – any ideas how to fix it?
- @media in bluehost is being commented out [closed]
- Twenty Fifteen : Wider right column for the content
- Moving button on Online Consulting theme
- css file status 403
- How can I get the search form to be selected automatically?
- Adding Custom css file
- Using transient for dynamic css , how to name it?
- Is there a way to add additional CSS styles to the styles css file dynamically?
- Is it safe to use WordPress generated classes?
- Change CSS on a wordpress post
- Unstable handling of CSS under WordPress/Elementor
- Trying to hide a button on a specific WordPress Page ID
- How to add animation the featured image?
- get_template_directory_uri() generates wrong path
- How to change the settings of a video? [closed]
- Change text color dynamically in WordPress [closed]
- First element/selector of enqueued CSS file breaks
- Different background for different page
- calling an additional css and js links for a custom page template
- Styling last item in ul [closed]
- I have html form and need to make it work in text editor on template. Only problem is it has .sccs styling file
- 2 css files? Theme css file gets override by another css file that I can not edit
- How to insert the current user’s role into the body class in the admin backend
- Need to make sidebar responsive only when screen width is greater than 1024px
- Does anyone know how to make text fade in when scrolling down, that doesn’t require any plug-ins? [duplicate]
- Unused CSS in WordPress Plugins
- I have text on a banner on my wordpress site and I am unable to get rid of it? Would appreciate any help or advice :-)
- How to change specific menu tab from left to right in My Home Theme?
- Admin bar default color scheme for nonregistered/nonlogged users
- Lines of CSS only being delivered while logged in
- Twenty Fourteen: Unsticky header after making header bigger
- How to display javascript banner in website header?
- How to Take Logo Out of Navigation Menu? [closed]
- Make different border color gallery items
- Loading css files conditionally useful?
- How remove the white space between my menu and slider?
- Sidebar at bottom however I have completely replaced theme folder back to original code
- Site not 100% responsive
- Dropdown menu’s fighting with each other [closed]
- Customizer: CSS changes not persistent
- Move both sidebars more to their sides [closed]
- Style Switching
- Which hook to use to add notification message at beginning of my
- single.php doesn’t getting style
- Theme looks ugly – FOUC – stylesheets loaded in footer
- How to make widgetized footer styles be inherited from body?
- custom css in admin panel by user id
- Site layout problems when logged in due to admin bar
- Add “sub-nav” class to a sub menu parent item
- Current Post/Page Ancestor, CSS
- How to target only one element if more elements share the same CSS class
- Can’t override CSS with child theme
- Custom css code in wordpress [closed]
- Using Easy Google Fonts correctly and Droid Sans on Max OS X [closed]
- remove white overlay [closed]
- Why doesn’t media(max-width) work on h2 title?
- How to use WordPress 3.8 back-end CSS in front-end?
- WordPress site suddenly not showing some DOM elements but mobile is fine
- Editing size of h3 tag in wordpress on a one-off basis
- Content doesn’t fit on large size desktops like 2560×1440