octocatstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource
via CSS Lint

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource
via JS Hint

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Want a Run Button?

If active, the preview will update automatically when you change code.

HTML

            
              <!DOCTYPE html>
<html>
<meta charset="utf-8" />
<title>CSS Dropdown Menu</title>
<link href="cssdrop.css" rel="stylesheet" />
<script="" src="html5shiv.js" />

<body>
<div id="container" style="width:1300px">
<div id="header">
<img class="displayed" alt="" src="logo.jpg" width="200" height="80">
<p id="tagline">Your Comfort Is Our Priority</p>

<nav>
<ul>
<li><a href="#" class="">Home</a></li>
<li><a href="#" class="">Accomodation</a>
<ul>
<li><a href="#" class="">Deluxe</a></li>
<li><a href="#" class="">Exec Dlx</a></li>
<li><a href="#" class="">Family Suite</a>
<ul>
<li><a href="#" class="">HTML</a></li>
<li><a href="#" class="">CSS</a></li></ul></li></ul></li>
<li><a href="#" class="">Restaurant</a>
<ul>
<li><a href="#" class="">Main Coffee Hse</a></li>
<li><a href="#" class="">2nd Coffeee Hse</a></li></ul></li>
<li><a href="#" class="">Book now</a></li></ul></nav>

<ul class="rslides">
<li><img alt="" src="flash.jpg"></li>
<li><img alt="" src="flash1.jpg" ></li></ul>
<script src="jquery.min.js" ></script>
<script src="responsiveslides.min.js"></script>
<script>
  $(function () {
    $(".rslides").responsiveSlides();
  });
</script><br />

<p id="text">&nbsp;</p>
<p id="text">First Residence is the latest hotel situated in the heart of Kemaman town. The hotel is located strategically in town surrounded by Utilities Bodies such as Petronas, Police, City Council & also places of interest.</p>
</div>

<div id="menu" style="height:200px;width:650px;float:left;">
<li>7 km to Petronas Gas Terminal</li>
<li>3 km to Police District</li>
<li>13 km to City Council</li>
</div>
<div id="content" style="height:200px;width:650px;float:left;">
<li>13 km to Kampong Ibok(Firefly Sanctuary)</li>
<li>13 km to Kijang Beach</li>
<li>4 km to Bus Terminal</li>
</div>
<div id="footer" style="clear:both;text-align:center;">
<img class="displayed" alt="" src="bigmap.jpg" height="300" width="400" />
</div>
</body>
</html>
            
          
!

CSS

            
              img.displayed {
    display: block;
    margin-left: auto;
    margin-right: auto }
    
p { text-align: center } 
    
#tagline { color:#984806;
           font-family:"brush script mt"; font-size: 35px;
        
}

#text { clear: left; } 

body {
	background: url(bkgrnd.jpg);
	font-family: Helvetica, sans-serif; font-size: 18px; line-height: 24px;
}

nav {
	margin: 30px auto; 
	text-align: center;
}

nav ul ul {
	display: none;
}

	nav ul li:hover > ul {
		display: block;
	}


nav ul {
	background: linear-gradient(top, #DDAC7C 0%, #985F28 100%);  
	background: -moz-linear-gradient(top, #DDAC7C 0%, #985F28 100%); 
	background: -webkit-linear-gradient(top, #DDAC7C 0%,#985F28 100%); 
	box-shadow: 0px 0px 9px rgba(0,0,0,0.15);
	padding: 0 20px;
	border-radius: 10px;  
	list-style: none;
	position: relative;
	display: inline-table;
	z-index:1;
}
	nav ul:after {
		content: ""; clear: both; display: block;
	}

	nav ul li {
		float: left;
	}
		nav ul li:hover {
			background: linear-gradient(top, #FFD289 0%, #A15016 40%);
			background: -moz-linear-gradient(top, #FFD289 0%, #A15016 40%);
			background: -webkit-linear-gradient(top, #FFD289 0%,#A15016 40%);
		}
			nav ul li:hover a {
				color: #FFD289;
			}
		
		nav ul li a {
			display: block; padding: 25px 40px;
			color: #FFD289; text-decoration: none;
		}
			
		
	nav ul ul {
		background: #A15016; border-radius: 0px; padding: 0;
		position: absolute; top: 100%;
	}
		nav ul ul li {
			float: none; 
			border-top: 1px solid #DDAC7C;
			border-bottom: 1px solid #DDAC7C; position: relative;
		}
			nav ul ul li a {
				padding: 15px 40px;
				color: #FFD289;
			}	
				nav ul ul li a:hover {
					background: #8B4513;
				}
		
	nav ul ul ul {
		position: absolute; left: 100%; top:0;
	}
	
.rslides { 
    width: 1122px;
    margin: 0 auto;
    list-style:none;
  }
	
            
          
!

JS

            
              
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console