Archived topic
Css Horiztonal rule hr styling not working?
6 replies · Started by Tully on January 9, 2017
Hi Tom,
I have used the following CSS script in other generatepress websites with effect, however not having any affect on my new website http://www.workingsheepdogtraining.com/about-tully ? I have added it in to simple css, both on the main css page and also to the actual page itself but no result?
hr { /* settings for horizontal rule */
padding: 0px;
margin-top: 10px;
margin-bottom: 15px;
width:100%;
border: none;
height: 1px;
/* Set the hr color */
color: black; /* old IE */
background-color: black; /* Modern Browsers */
}
PS. I've used the same css in http://www.campaspeworkingdogs.com and you can see the effect there
I can't see the first site as it's password protected.
If the exact CSS is working on a different site, it most likely means you have a syntax error in your CSS on the site where it's not working.
To test, move the HR CSS to the very top of the CSS file and see if it works.
Thanks Tom, moving CSS to top of CSS fixed it. Why would that matter?
Because CSS executes from the top and stops when a syntax error is encountered. Once you fix that error (like missing a bracket) then you can move it back to the bottom again.
Great thanks for the info
You're welcome!