<!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Example Making DIV Contents Scroll Horizontally, width multiple Div`s inside</title> <style type="text/css"> #container { position: relative; height: 9em; width: 99%; margin: 2px auto; background: #abefcd; text-align: left; white-space: nowrap; overflow-x: auto; overflow-y: hidden; vertical-align:middle; } #container div { display: inline-block; width: 14em; height: 6em; margin: 0.5em; border: 1px solid blue; padding: 3px; white-space: normal; text-align: center; } </style> </head> <body> <div id="container"> <div>Content in Div 1:<br/> Web Development courses</div> <div>Div 2<br/>https://coursesweb.net/</div> <div>Div 3<br/>https://coursesweb.net/css/</div> <div><img src="some_image" width="99" height="36" alt="Image Text" /></div> <div>Div 5<br/>https://coursesweb.net/html/</div> </div> </body> </html>Demo:
To have the Div`s inside container aligned perfectly, their content must have the same number of rows.
<input type="number" name="points" min="5" max="80" />
#id { filter:alpha(opacity=40); /* for IE */ opacity:0.4; }
var num = 12.34567; alert( num.toPrecision(3) ); // 12.3
$lang =[10=>"PHP", 20=>"JavaScript", "site"=>"coursesweb.net"); shuffle($lang); var_export($lang); // array (0=>"coursesweb.net", 1=>"PHP", 2=>"JavaScript")