Benedikt Winckler Benedikt Winckler - 1 year ago 80
HTML Question

How can I set a background image for multiple divs?

I am using four divs to display some services:

enter image description here

I want to use a background image for the four images like in this example:

How can I do it? The resolution should be responsive so I can't use the crop tool to cut the image.

Answer Source

Here is the updated Demo

it's actually a play with position: absolute. the example site you are given also doing the same way. its actually <img> tag, not background

here is the Code:

	max-width: 600px;
	position: absolute;
	top: 10px;
	max-width: 600px;
	width: 10px;
	position: absolute;
	top: 0px;
	height: 100%;
	background: white;
	left: 150px;
	left: 300px;
	left: 450px;
<div class="container">
	<img src=",h_500,al_c,q_85/b2c0a7_a44d01e99b665e19effb29e4fc36ded3.jpg" alt="">
	<div class="divider one"></div>
	<div class="divider two"></div>
	<div class="divider three"></div>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download