Despite the name, :before
doesn’t actually set the layering position of elements, that’s set via z-index
. To position your :before element behind the H1 text, you need to add
z-index: -1;
to the :before element, like so:
.game-center-result .score h1:before {
content: "";
position: absolute;
display: block;
width: 100%;
height: 2px;
background: #44454d;
left: 0;
right: 0;
bottom: 60px;
margin: 0 auto;
z-index:-1;
}
Related Posts:
- 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
- How to make padding:auto work in CSS?
- How to vertically center inside the parent element with CSS?
- 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?
- CSS fixed width in a span
- Adding border to CSS triangle [duplicate]
- How to enqueue style before style.css
- 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
- 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]
- 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?
- How do you customize the admin bar for buddypress?
- 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?
- 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
- Add core style in theme
- 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
- calling an additional css and js links for a custom page template
- Styling last item in ul [closed]
- How to change color of some items through css [closed]
- Remove custom css made by the custom theme
- Font styling in embedded Twitter feed
- WordPress backend is loading as a list
- sidebar with hovering mouse effect
- Default paragraph block styles just for pages NOT for posts?
- Embed widget from external source (Zendesk)
- Loading a stylesheet conditionally & verifying CSS
- Dequeue styles with query doesn’t work
- Dynamically populated scss values or how to change styles by user choice
- Save custom option in CSS file
- broken internal JavaScript and CSS files
- WordPress login using a completely custom page and no plugins?
- Modifications on css file are not visible
- Gutenberg CSS Issue
- Trying to hide the contact form on a particular page
- How to change specific menu tab from left to right in My Home Theme?
- WP Admin Bar transparent on some pages (.screen-reader-shortcut)
- Admin bar default color scheme for nonregistered/nonlogged users
- Lines of CSS only being delivered while logged in
- How to display javascript banner in website header?
- How to Take Logo Out of Navigation Menu? [closed]
- @media applying globally and not separately for each screen width [closed]
- Make different border color gallery items
- Loading css files conditionally useful?
- How remove the white space between my menu and slider?
- 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
- 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?
- Narrow paragraph block aligned to left of “wrapper”
- Transparent Overlay for Gravity Forms Ajax Spinner
- Remove the main title, but only from the main page
- aos properties ‘invalid’ and not recognised when included as a css class [closed]
- ACF Extended : Disable styles in front [closed]
- How to avoid problems caused by new block-library default CSS rules (wp 6.1.1)