CodePen

HTML

            
              	<div id="container" class="clearfix">
		<div class="portfolioitem">
			<a href="#"><img src="http://i.imgur.com/fA5baH5.jpg"></a>
			<h2><a href="#">Vip Tours Osijek Croatia Company</a></h2>
		</div><!-- end portfolioitem -->
		
		<div class="portfolioitem">
			<a href="#"><img src="http://i.imgur.com/fA5baH5.jpg"></a>
			<h2><a href="#">Fortuna Obrt</a></h2>
		</div><!-- end portfolioitem -->
		
		<div class="portfolioitem">
			<a href="#"><img src="http://i.imgur.com/fA5baH5.jpg"></a>
			<h2><a href="#">Hoteli Makarska</a></h2>
		</div><!-- end portfolioitem -->
		
		<div class="portfolioitem">
			<a href="#"><img src="http://i.imgur.com/fA5baH5.jpg"></a>
			<h2><a href="#">Justin's Johnson</a></h2>
		</div><!-- end portfolioitem -->
		
		<div class="portfolioitem">
			<a href="#"><img src="http://i.imgur.com/fA5baH5.jpg"></a>
			<h2><a href="#">Replay Hrvatska</a></h2>
		</div><!-- end portfolioitem -->
		
		<div class="portfolioitem">
			<a href="#"><img src="http://i.imgur.com/fA5baH5.jpg"></a>
			<h2><a href="#">Park prirode "Lastovsko Otočje"</a></h2>
		</div><!-- end portfolioitem -->
	</div><!-- end container -->
            
          
!

↑ Insert the most common viewport meta tag

CSS

            
              * {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  -ms-box-sizing: border-box;
  box-sizing: border-box;
  margin: 0;
  padding: 0; }

.clearfix {
  *zoom: 1; }
  .clearfix:before, .clearfix:after {
    display: table;
    content: ""; }
  .clearfix:after {
    clear: both; }

#container {
  display: block;
  position: relative;
  width: 960px;
  margin: 0 auto;
  background: red; }
  #container .portfolioitem {
    display: inline-block;
    width: 280px;
    height: 350px;
    margin: 20px;
    float: left;
    background: green; }
    #container .portfolioitem img {
      width: 280px;
      height: 280px; }
    #container .portfolioitem h2 {
      font-size: 10px;
      font-size: 1rem;
      text-align: center;
      text-transform: uppercase;
      letter-spacing: 1px; }
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................