I have been trynig to put a background inside a background on my website. I was able to put the background color that I wanted with this code:
<body bgcolor="#F5F2D4">
<div class="Gallery">
<h1> Gallery </h1>
</div>
</body>
After, in CSS I did the following
.Gallery h1 {
text-align: center;
font-family: 'Century Gothic', CenturyGothic, AppleGothic, sans-serif;
font-size: 55px;
font-style: normal;
font-variant: normal;
font-weight: 500;
line-height: 26.3999996185303px;
background-color: White;
}
The background would look something like this (B=Beige, W=White:
-------------------------
|BB|WWWWWWWWWWWWWWWWWW|BB|
|BB|WWWWWWWWWWWWWWWWWW|BB|
|BB|WWWWWWWWWWWWWWWWWW|BB|
|BB|WWWWWWWWWWWWWWWWWW|BB|
|BB|WWWWWWWWWWWWWWWWWW|BB|
-------------------------
This made the colors that I wanted in the background, but it is not scaled. It only has a few pixels of difference from the border of the browser until the White starts, is there any way to make the distance increase?
Also, is there any way to make the White Background scroll all the way down?
Thank you very much.
That image isn't made up of a single background: it's made up of multiple elements which have different backgrounds:
Where the letters represent certain coloured/different backgrounds.
For example, below I've used three elements:
Note I've used background-colors, but alternatively you can use images/etc.
Give the
html
,body
and.gallery
all aheight: 100%
to make the.gallery
take up the entire height of the screen.If you want the
.gallery
to have a fixed width (as in the example below) give it awidth
and addmargin: 0 auto
to have it center itself horizontally in the screen. If you don't want it to have a fixed width add apadding: 0 100px
on thebody
if you want to have 100 pixels from the left and right side of the.gallery
to be beige.