Solution 1 :

Well, add the background image for the body and add background: white (or whatever color you want) to the content container to avoid the body background “shining through”.

Solution 2 :

Is the following code what you were looking for?
If so, essentially it is a background color for the “border”, the above element having a margin.

body {
  background-color: dodgerblue;
}

#content {
  position: fixed;
  background-color: #fff;
  border-radius: 15px;
  padding-top: 15px;
  text-align:center;
  
  height: 100%;
  width: 88%;
  margin: 25px;
}
<body>
  <div id="content">
    <h1>Wow!!</h1>
  </div>
</body>

Problem :

I am building a webpage and I am attempting to add an image behind the container in the margins on the left, right and top.

The closest example of my current webpage is found in this demo: https://html5up.net/phantom.

I wish to ass a background image similar to the blue in this image: https://i.stack.imgur.com/NHbqU.png

So I want the image to be behind a floating page.

Comments

Comment posted by Vaibhav

Welcome to Stackoverflow! Code placed on external source makes difficult to help you, please add workable example here.

By

Leave a Reply

Your email address will not be published. Required fields are marked *