.left { float: left; background-image: url('image_...">

Background image left and right

How do I make this work?

<html> <head> <style type="text/css"> .left { float: left; background-image: url('image_with_variable_width.png'); background-repeat: repeat-y; } .right { float: right; background-image: url('image_with_variable_width_flipped.png'); background-repeat: repeat-y; } </style> </head> <body> <div class="left"></div> <div class="right"></div> </body> </html> 
+4
source share
2 answers

If the divs are empty, then nothing will appear, because their height and width are zero. To make a background image, specify the height and width.

+5
source

Add height and width for your divs.

+1
source

All Articles