https://i.sstatic.net/SN1j8.jpg
This layout design is my own creation. It's structured like this:
<div class="outer">
<div class="container">
<div class="content"></div>
<aside></aside>
</div>
</div>
Here is the CSS for this layout:
.container{width:1000px; margin:0 auto;}
.content{width:70%; float:left;}
aside{width:30%; float:left;}
Now, I'm looking to add a gradient background to the sidebar. While I can create a gradient image repeat-y for the sidebar, it causes the container's margin-right space to also have the same gradient effect.
To tackle this issue, I applied the background gradient to the .outer div. This works well on normal desktop screens, but higher resolution displays show some displacement in the gradient.
https://i.sstatic.net/tzIuE.jpg
The displacement is due to percentage values used in generating the gradient. Here's the default gradient line without prefix that I used:
background: linear-gradient(to right, #ffffff 0%,#ffffff 67%,#e5e3e6 66%,#f5f5f5 72%,#f5f5f5 100%);
Any suggestions for fixing this issue?
** The page has a long content area with a short sidebar. However, the background should extend from top to bottom.
If you would like to see a live example, visit