1

I've tried the background-image tag in my CSS and also in a tag in my HTML. I can't get anything to appear behind my wrapper. I can get my wrapper background to appear with color, but that it.

html,
body {
    background-image: url("https://vgy.me/u/TpG24N");
    text-align: center;
    height: 100%;

}

#wrapper {
    margin: 2% auto;
    width: 875px;
    height: 80%;
    box-sizing: border-box;
    background-color: rgb(250, 194, 245)
}

#subwrapper {
    position: relative;
}
Hyyan Abo Fakher
  • 3,497
  • 3
  • 21
  • 35

3 Answers3

1

You set a background-color in #wrapper, that will not show anything BEHIND it. Simply set:

#wrapper{
 background-color: transparent;
}

Now the element behind #wrapper will show through.

Edit`:

You can also make it semi-transparent, if you want, keeping your color and set opacity to a value between 0 and 1, like this:

#wrapper {
    background-color: rgb(250, 194, 245)
    opacity: 0.5;
}

Now the #wrapper will have a semi-transparent color. Experiment with the right value for opacity, until it looks like you want.

Poul Bak
  • 10,450
  • 5
  • 32
  • 57
1

your background image url https://vgy.me/u/TpG24N is not refer to an image, do you mean https://vgy.me/TpG24N.jpg

html,
body {
    background-image: url("https://vgy.me/TpG24N.jpg");
    text-align: center;
    height: 100%;

}
kite.js.org
  • 1,599
  • 10
  • 11
0

You did not add image extension URL

html,body {
    background-image: url("https://vgy.me/u/TpG24N");
    text-align: center;
    height: 100%;

}

Also, Need to add

#wrapper{
 background-color: transparent;
}
Shakil Hossain
  • 1,701
  • 13
  • 25