jquery - Difficulty positioning images using CSS -
i experiencing difficulty positioning (or more accurately, combining) various graphical images form one complete image using css. reason doing way (eventually), when have them correctly placed in header of web site building, able use easing css animation bring them together.
the bigger picture consists of following graphic images:
the way want this:
with css have below, looking this:
here css , html code:
.clip_frame /* used clip contents in case of image frame */ { overflow: hidden; } .middlecontent { text-align: center; position: relative; } .middlecontent > img { display: inline-block; } .centervertical { display: inline-block; vertical-align: middle; } .header-left { float: left; margin-left: 0; position: relative; } .header-left-top { vertical-align: top; position: absolute; } .header-left-bottom { vertical-align: bottom; position: absolute; } .header-right { float: right; margin-right: 0; position: relative; } .header-right-top { vertical-align: top; margin-top: 0; position: absolute; } .header-right-bottom { vertical-align: bottom; margin-bottom: 20; position: absolute; } .center-top { text-align: center; vertical-align: top; } .center-top > img { display: inline-block; position: absolute; z-index: 1; } .center-bottom { text-align: center; vertical-align: bottom; } .center-bottom > img { display: inline-block; position: absolute; z-index: 2; }
<?php /* wrapper name: header */ ?>. . . <div class="row"> <div class="middlecontent"> <div class="clip_frame centervertical"> <div class="clip_frame header-left"> <span class="clip_frame header-left-top"> <img src="http://i.stack.imgur.com/yujmj.gif" alt="" width="500" height="6px"/> </span> <img src="http://i.stack.imgur.com/1kdly.gif" alt="" width="500" height="80" /> <span class="clip_frame header-left-bottom"> <img src="http://i.stack.imgur.com/yujmj.gif" alt="" width="500" height="6px"/> </span> </div> </div> <div class="clip_frame centervertical"> <span class="clip_frame center-top"> <img src="http://i.stack.imgur.com/kujpv.gif" alt="" width="238" height="70"/> </span> <span class="clip_frame" data-motopress-type="static" data-motopress-static-file="static/static-logo.php"> <img src="http://i.stack.imgur.com/fombd.gif"> </span> <span class="clip_frame center-bottom"> <img src="http://i.stack.imgur.com/dpz1l.gif" alt="" width="238" height="70"/> </span> </div> <div class="clip_frame centervertical"> <div class="clip_frame header-right"> <span class="clip_frame header-right-top"> <img src="http://i.stack.imgur.com/yujmj.gif" alt="" width="500" height="6px"/> </span> <img src="http://i.stack.imgur.com/1kdly.gif" alt="" width="500" height="80" /> <span class="clip_frame header-right-bottom"> <img src="http://i.stack.imgur.com/yujmj.gif" alt="" width="500" height="6px"/> </span> </div> </div> </div> </div>
i have embedded php header wrapper:
note using cherry framework of wordpress, hence definition of 'row' class selector not defined theme developing. it's purpose, however, vertically align text/images rows of table, apparently cherry framework uses structure header of each page. nevertheless, not believe should interfere trying achieve. correct me if wrong.... advice and/or feedback, including suggestions using easing css animation, appreciated.
n.b. actual logo using not 1 have provided here. in fact greyscale 182x182 gif image.
replace html code
<div class="middlecontent"> <div class="clip_frame centervertical"> <div style="width:500px;" class="clip_frame header-left"> <span class=""> <img width="500" height="6px" alt="" src="http://i.stack.imgur.com/yujmj.gif"> </span> <img width="500" height="80" alt="" src="http://i.stack.imgur.com/1kdly.gif"> <span style="top:-9px;position:relative;" class=""> <img width="500" height="6px" alt="" src="http://i.stack.imgur.com/yujmj.gif"> </span> </div> </div> <div style=" height: 233px; margin-left: -14px; margin-right: -14px; position: relative; width: 220px;" class="clip_frame centervertical"> <span style="position: absolute; top: 0px; left: 1px;" class=""> <img width="217" height="70" alt="" src="http://i.stack.imgur.com/kujpv.gif"> </span> <span style="position: relative; top: 27px;" data-motopress-static-file="static/static-logo.php" data-motopress-type="static" class="clip_frame"> <img src="http://i.stack.imgur.com/fombd.gif"> </span> <span style="bottom: 1px; position: absolute; left: 1px;" class=""> <img width="217" height="70" alt="" src="http://i.stack.imgur.com/dpz1l.gif"> </span> </div> <div style="width:500px;" class="clip_frame centervertical"> <div class="clip_frame header-right"> <span class=""> <img width="500" height="6px" alt="" src="http://i.stack.imgur.com/yujmj.gif"> </span> <img width="500" height="80" alt="" src="http://i.stack.imgur.com/1kdly.gif"> <span style="top:-9px; position:relative;" class=""> <img width="500" height="6px" alt="" src="http://i.stack.imgur.com/yujmj.gif"> </span> </div> </div> </div>
Comments
Post a Comment