Sunday, 15 February 2015

css - How to horizontally center a DIV and align 2 others to the sides -



css - How to horizontally center a DIV and align 2 others to the sides -

i want center swf file between 2 skyscrapers.

the skyscrapers should far possible swf (right/left). how can this?

i'm using "float:left" on 3 divs can't center swf , skyscrapers close swf.

this im doing:

<div style="width:100%"> <div style="float:left">banner 1 goes here</div> <div style="float:left">swf file goes here</div> <div style="float:left">banner 2 goes here</div> </div>

the swf online game want banners far user's screen allows it.

thank you!

try out following: float skyscrapers, center swf. sizes here example. interactive fiddle: http://jsfiddle.net/0el6dwgx/2/

html

<div id="wrap"> <div id="left">left</div> <div id="right">right</div> <div id="center">center</div> </div>

css

#wrap { width: 600px; overflow: hidden; } #left { float: left; width: 100px; height: 400px; } #right { float: right; width: 100px; height: 400px; } #center { width: 300px; height: 200px; margin: 0 auto; }

css

No comments:

Post a Comment