R
R
Roman Romanovich2015-11-05 12:53:56
css
Roman Romanovich, 2015-11-05 12:53:56

Stretch background to full screen width?

Good afternoon!
I have a fixed-width parent container that has a full-page-width block inside it, how can I stretch the background of this div?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Mihai, 2015-11-05
@Q2art

codepen.io/Q2art/pen/EVevNM

Z
zooks, 2015-11-05
@zooks

background-size: cover;

D
deeppines, 2015-11-05
@LucasKane

If a block with width: 100% has nothing but a background, then it would be more logical to make it a parent of a block with a fixed width and not suffer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question