html - CSS background elements on both sides of the screen -


i want achieve this: 2 decoration elements (sort of waves) on both sides of screen. here's i've got far. if more elegant solution possible (like styling css body element), please advise. below solution fine, if both < img > elements not visible. can check in action.

here's working fiddle.

can help?

<!doctype html> <html class=""> <head>     <meta charset="utf-8">     <meta name="viewport" content="width=device-width, initial-scale=1">     <link type="text/css" rel="stylesheet" href="styles/style.css" >     <style type="text/css">         .background_left {             background-image:url("http://www.destadesign.com/destacms/images/background_border_left.png");             background-repeat:repeat-y;             background-position:left;             position:absolute;             left:0;         }          .background_right {             background-image:url("http://www.destadesign.com/destacms/images/background_border_right.png");             background-repeat:repeat-y;             background-position:right;             position:absolute;             right:0;         }         .background_left, .background_right {             height:100%;         }      </style>  </head>  <body>     <div class="background_left">         <img src="http://www.destadesign.com/destacms/images/background_border_left.png">      </div>      <div class="background_right">         <img src="http://www.destadesign.com/destacms/images/background_border_right.png">     </div>       <div class="content" style="height:500px;"> <!-- content -->     </div> </body> </html> 

just this:

    body {      	background:url("http://www.destadesign.com/destacms/images/background_border_left.png") left repeat-y,url("http://www.destadesign.com/destacms/images/background_border_right.png") right repeat-y;  }

css adds 2 background images body, positions them right or left respectively, , sets repeat-y, doesn't fill screen.

jsfiddle demo


Comments

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -