html - Banner with autoheighted edges (absolute position) -


well, want:

<body style="background-color: green;"> <div style="float: left; height: 40px; width: 50%; background-color: white;"></div> <div style="float: left; height: 40px; width: 50%; background-color: black;"></div> <div style="position: absolute; left: 50%;">     <div style="position: relative; left: -50%; border: dotted yellow 1px; background-color: green;">         <img src="http://prog.hu/site/images/logo.gif" width="100%" />     </div> </div> </body> 

http://jsfiddle.net/g4eec/2/

this want, thing height of edges must dynamic, height banner is. there solution?

see fiddle http://jsfiddle.net/g4eec/3/

code

<body style="background-color: green;"> <div style="overflow:hidden;background:#ccc;position:relative;z-index:34">     <div style="height:1000px;width:50%;background:#fff;position:absolute;top:0;left:0;z-index:-2"></div>     <div style="height:1000px;width:50%;background:#000;position:absolute;top:0;right:0;z-index:-2"></div>     <img src="http://prog.hu/site/images/logo.gif" style=" border: dotted yellow 1px; background-color: green;display:block;margin:0 auto;z-index:34;"/> </div> 


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -