Hello here,
I currently have a small issue to put my background image in full screen. I mean, out of the body width.
First, I defined : width: 900px; and margin: auto; to the body.
Second, I created an html div element for the background image with CSS position: absolute; and right: 0; but there are still margin left and right.
My question is: How can I make the background-image full screen (it should exceed the body margins left and right).
My code below (I removed the url from the img):
HTML:
(...)
<body>
<main>
<div id="background-image"></div>
<div id="container">
<div class="container__image">
<img src="#" id="logo" alt="Maison Mauricette's logo">
</div>
(...)
CSS:
/*GENERAL*/
html, body{
background-color: #f5f5f5;
margin: auto;
width: 900px;
position: relative;
}
body{
font-family: Verdana, "Trebuchet MS", Arial, sans-serif;
font-size: 0.9em;
}
body, #background-image{
background: url(#) top left repeat-x;
width: 100%;
position: absolute;
right: 0;
left: 0;
}
Thank you in advance for your precious help!
Manon