I've recently designed a banner for my website, but I want the main part of my site to be limited to 900px in width. I'd like the banner to extend off the page with darkened edges (using opacity). To achieve this effect, I need to position the image in the middle. Here's what I've come up with so far:
https://jsfiddle.net/h3w89t9y/4/
Unfortunately, this doesn't quite meet my requirements. Here's the problem:
.banner {
background:url(https://i.gyazo.com/74f0fa6b9d9ed6652f3e220ceae113cf.png) no-repeat;
background-position: center;
margin: 0 auto;
height:185px;
}
The banner isn't 900px wide. If I set the width to 900px, it will center as intended. However, the image will only be visible within that 900px limit instead of extending beyond it.
This is the desired look I'm aiming for:
How can I center my banner while having the edges overlap with opacities?