html - how do i place three div side by side in header -


html code

<div class="header" style="float:left"> <div class="logo"> <img src="some image" height="200px" width="200px"/> </div> <div class="name">company name</div> <div class="pic"> <img src="some image" height="200" width="200"/> </div>  </div> 

css styling

header{background-color:red;width:1200px;height:400px;float:;} .logo{width:17%;} .name{color:#adff2f;font-size:48pt;margin-left:250px;width:38%} .pic{;margin-left:950px;} 

.header > div {     float: left; } 

also, header class in css needs have . in front of it.

you need remove margin-left .pic

http://jsfiddle.net/samliew/dac7p


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -