D
D
Daniel-it2018-03-02 19:56:51
css
Daniel-it, 2018-03-02 19:56:51

How to make background full width?

The psd layout has a background image for the block. But is it not big enough? What can be done in this situation?
5a99822618239038130134.png5a9982157b70d152228045.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
K. A., 2018-03-02
@Daniel-it

set an image as a background in the block and stretch it. something like this:

div.background {
background-image: url('/path/to/background.jpg');
background-repeat: no-repeat;
background-size: cover;
width: 100%;
height: 300px;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question