The code presented in this page shows you how to make DIV contents scroll horizontally, with multiple Div's inside aligned horizontally.
To create this design, sets these CSS properties to container DIV:
      - a fixed width and height.
      - white-space: nowrap; to keep the contents on the same line; to not go to a new row.
      - overflow-x: auto; - to display the horizontal scroll bar when the contents exceeds container width.
      - overflow-y: hidden; - optional, to not display the vertical scroll bar.

And add these CSS properties the children DIV's:
      - display: inline-block; - to align the DIV's horizontally.
      - white-space: normal; - to anulate the "nowrap" inherited from parent (container) DIV.

Here is an example.
<!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/>http://coursesweb.net/</div>
 <div>Div 3<br/>http://coursesweb.net/css/</div>
 <div><img src="some_image" width="99" height="36" alt="Image Text" /></div>
 <div>Div 5<br/>http://coursesweb.net/html/</div>
</div>

</body>
</html>
Demo:
Content in Div 1:
Web Development courses
Div 2
http://coursesweb.net/
Div 3
http://coursesweb.net/css/
Image Text
Div 5
http://coursesweb.net/html/

To have the Div`s inside container aligned perfectly, their content must have the same number of rows.

Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
Which tag defines the clickable areas inside the image map?
<map> <img> <area>
<img src="image.jpg" usemap="#map1">
<map name="map1">
  <area shape="rect" coords="9, 120, 56, 149" href="#">
  <area shape="rect" coords="100, 200, 156, 249" href="#">
</map>
Which CSS property defines what is done if the content in a box is too big for its defined space?
display overflow position
#id {
  overflow: auto;
}
Click on the event which is triggered when the mouse is positioned over an object.
onclick onmouseover onmouseout
document.getElementById("id").onmouseover = function(){
  document.write("Have Good Life");
}
Indicate the PHP variable that contains data added in URL address after the "?" character.
$_SESSION $_GET $_POST
if(isset($_GET["id"])) {
  echo $_GET["id"];
}
Making DIV Contents Scroll Horizontally, with multiple Div`s inside

Last accessed pages

  1. CSS cursor property - Custom Cursors (3102)
  2. Remove / Get duplicate array values - Reset array keys in PHP (5853)
  3. Add Tag to Selected Text in textarea with JavaScript (751)
  4. Add, Change, and Remove Attributes with jQuery (22007)
  5. Get all the unique numbers from two-dimensional array (87)

Top accessed pages

  1. Courses Web: PHP-MySQL JavaScript Ajax HTML CSS Flash-AS3 (45592)
  2. Read Excel file data in PHP - PhpExcelReader (34306)
  3. PHP-MySQL free course, online tutorials PHP MySQL code (34225)
  4. Get Attribute (ID, Class, Name, Title, Src) with jQuery (30806)
  5. PHP PDO - exec (INSERT, UPDATE, DELETE) MySQL (28062)