I'm currently working on a WordPress site and have encountered an issue with the header image. I want it to span the full width of any browser window.
The existing code in the parent theme is as follows:
background: url("/test/wp-content/themes/Howtopassyourexams.com/Theme/images/page-header-bg.jpg");
background-repeat: no-repeat;
background-position: center center;
-webkit-background-size: cover;
background-size: cover;
position: relative;
box-shadow: 0 7px 10px -10px #000;
width: 100%;
z-index: 0;
height: 300px;
margin-bottom: 80px;
In addition, there is a second stylesheet in the theme that inherits most styles from the parent stylesheet. The CSS for the image in that stylesheet is:
background: url("/test/wp-content/themes/Howtopassyourexams.com/Theme/images/page-header-bg.jpg");
width: 100%;
height: 300px;
Although I am not sure why there are two sets of CSS codes for the heading image in different stylesheets, this is how the theme was designed. My problem is that even when setting the width to 100%, the image maintains its original size (1369x325px) and gets cut off on smaller browsers.
If anyone can provide insight on what I might be doing wrong, please visit our website at
Thank you.