S
S
Sergey2015-10-14 20:04:41
css
Sergey, 2015-10-14 20:04:41

How to make a background on one side of the site?

The site has the usual structure: a header, a menu on the right (like on a toaster), content in the center, and a footer. How to make the entire background to the left of the menu a certain color. ! Attention, only this part. body {background} won't work, as it will flood the right side of the site, to the right of the content.
cf8711678e274c9faef486b86ca034e5.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Fedorov, 2015-10-14
@chelovekmuravei

body {
  background-image: linear-gradient(90deg, #f00 0%, #f00 50%, transparent 51%, transparent 100%);
}

A
Artem Artemov, 2015-10-14
@Vidaw

Assign div1 some kind of identifier, for example, <div id="div1">содержимое блока</div>
and then set the desired background in css:

#div1 {
background-color: gray;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question