html - 2 Background Colours - CSS only -
How do I add 2 background colors to a container device? I have seen some solutions that work, but with only 50% height for each color. I need a set height (see image).
My current solution is background 2 background color for the background background of 1x260px for background 1. It leaves you though, unless you open the page with 2 background color of Flash, Unless the background 1 is loading, I want to save this flash. Here is the structure of the page:
In advance Thanks for the help!
Update:
I could not find any solution to work properly in my context, but eventually resolved it myself (I I know maybe my brief maybe a bit incomplete).
This is mine
Here is the code:
html, body { Margin: 0; Padding: 0; }. Other content {background color: light blue; Width: 100%; Height: 20px; }. Page content {width: 100%; Background color: lightgray; }. Container {width: 600px; Height: 700px; / * This height is flexible and can change whatever value you want * / background color: gray; Margin top: -50px; Margin-left: auto; Margin-Correct: Auto; }. White-bg {background-color: dodgerblue; Height: 50px; Width: 100%; }
& lt; Div class = "other-content" & gt; & Lt; / Div & gt; & Lt; Div class = "page-content" & gt; & Lt; Div class = "white-bg" & gt; & Lt; / Div & gt; & Lt; Div class = "container" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "other-content" & gt; & Lt; / Div & gt;
Comments
Post a Comment