HTML CSS examples for CSS Layout:Div Align
Align divs side by side with CSS in the same line
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> div>div { display:inline-block; position:absolute; height:51px; } #first {<!--from w ww . j ava 2s .c o m--> background:red; left:0; width:51px; } #second { background:blue; left:51px; right:51px; } #third { background:green; right:0px; width:51px; } </style> </head> <body> <div> <div id="first"> Image </div> <div id="second"> Some Text </div> <div id="third"> Image </div> </div> </body> </html>