antonydoyle
4/4/2013 - 3:21 PM

A CodePen by Antony Doyle. responsiveMenu - Javascript-less responsive menu. Most of the css can be ripped out.

A CodePen by Antony Doyle. responsiveMenu - Javascript-less responsive menu. Most of the css can be ripped out.

* {
   box-sizing:border-box; 
}

html,
body {
  width:100%;
  height:100%;
}
body {
  margin:.75em;
}
input.sys_mobMenu[type=checkbox] {
  position: absolute;
  top: -9999px;
  left: -9999px;
}
label.sys_mobMenu {
  display: none;
  cursor: pointer;
  user-select: none;
}
#sys_topNav {
	z-index: 999;
	position: relative;
  width:940px;
}
#sys_topNav ul.sys_simpleListMenu {
	list-style: none;
	background-repeat: repeat-x;
}
#sys_topNav ul.sys_simpleListMenu li {
	display: inline-block;
	height:64px;
	margin-left:-4px;
background-color: #0099cc;
	border-right:1px solid #33add5;
	min-width:77px;
	width:auto;
	position: relative;
	vertical-align: middle;
	zoom: 1;
	*display: inline;
}
#sys_topNav ul.sys_simpleListMenu li .sys_selected {
	height: 64px;
padding-bottom: 25px;
font-weight: bold;
position: relative;
top: 12px;
}
#sys_topNav ul.sys_simpleListMenu li:hover, #sys_topNav ul.sys_simpleListMenu li .sys_selected{
	background:#000;
	font-weight: bold;
}
#sys_topNav ul.sys_simpleListMenu li a {
	color:#fff;
	font-weight: bold;
	font-size: 14px;
	text-align: center;
	display: block;
	height:64px;
	padding-left: 11px;
	padding-right: 11px;
	position:relative;
	top:50%;
	margin-top:-0.85em;
	vertical-align: middle;
	text-decoration: none;
}
#sys_topNav ul.sys_simpleListMenu li.sys_last {
	margin-right:0;
}



@media only screen and (max-width: 480px) {
#sys_topNav {
	   z-index: 999;
    position: relative;
    width:431px;
}
#sys_topNav[role="custom-dropdown"] ul {
    display: none;
    height: 100%;
}
#sys_topNav[role="custom-dropdown"] label.sys_mobMenu {
    position: relative;
    display: block;
    width: 50px;
    min-height: 2.6em;
    padding:0em;
    font-size: 1.1em;
    float:right;
    background-color: #0099cc;
}
#sys_topNav[role="custom-dropdown"] label.sys_mobMenu:after {
    position: absolute;
    top:12px;
    left:16px;
    content: "\2261";
    font-size: 1.8em;
    color:#fff;
}
#sys_topNav[role="custom-dropdown"] input.sys_mobMenu[type=checkbox]:checked ~ label:after {
    color: #222;
}
#sys_topNav[role="custom-dropdown"] input.sys_mobMenu[type=checkbox]:checked ~ ul {
    display: block;
    width: 435px;
}
#sys_topNav[role="custom-dropdown"] input.sys_mobMenu[type=checkbox]:checked ~ ul > li {
    width: 100%;
    text-align: left;
    overflow: hidden;
}
#sys_topNav[role="custom-dropdown"] input.sys_mobMenu[type=checkbox]:checked ~ ul > li a{
    text-align: left;
}
#sys_topNav[role="custom-dropdown"] input.sys_mobMenu[type=checkbox]:checked ~ ul > li:after {
	text-align: left;
}
#sys_topNav ul.sys_simpleListMenu {
  	background:transparent;
}
#sys_topNav ul.sys_simpleListMenu li {
	  border-bottom:1px solid #33add5 !important;
	  border-right:none !important;
	  background-color: #0099cc;
	  background-image: url('../images/mainNavBg.jpg');
}
#sys_topNav ul.sys_simpleListMenu li:hover, #sys_topNav ul.sys_simpleListMenu li .sys_selected, #sys_topNav ul.sys_simpleListMenu li.sys_first:hover{
	  background:none;
	  font-weight: bold;
	  background-color: #0099cc;
}
#sys_topNav ul.sys_simpleListMenu li.sys_first {
  display: inline-block;
  height:64px;
  margin-left:-4px;

	 min-width:77px;
	 width:100%;
	 position: static;
	 vertical-align: middle;
	 zoom: 1;
	*display: block;
	background: none;
	background-color: #0099cc;
	background-image: url('../images/mainNavBg.jpg');
	border-right:none;
	border-bottom:1px solid #33add5 !important;
}
#sys_topNav ul.sys_simpleListMenu li.sys_first a {
	text-indent: 0;
	background:none;
	width:inherit;
	top:0;
	margin-top:0;
	color: #fff;
	font-weight: bold;
	font-size: 14px;
	display: block;
	padding-left: 11px;
	padding-right: 11px;
	position: relative;
	top: 50%;
	margin-top: -0.85em;
	vertical-align: middle;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	-ms-box-sizing: border-box;
	box-sizing: border-box;
	text-decoration: none;
}
#sys_topNav ul.sys_simpleListMenu li .sys_selected {
	height:100%;
	width:100%;
	display: block;
	padding:0;
	background:transparent;
}
#sys_topNav ul.sys_simpleListMenu li .sys_selected {
	top:0;
}

}
/* THERE IS NO SPOON */
<div class="sys_row" id="sys_topNav" role="custom-dropdown">
    <input class="sys_mobMenu" type="checkbox" id="button">
    <label class="sys_mobMenu" for="button" onclick></label>
    
   <ul class="sys_simpleListMenu">
						<li class="sys_first">
							<a title="title here" class="sys_0 sys_t5966" href="#">Home</a>
						</li>
						<li>
							<div class="sys_selected">
							<a title="title here" class="sys_0 sys_t5966" href="#">About Us</a>
						</div>
						</li>
						<li>
							<a title="title here" class="sys_0 sys_t5966" href="#">News &amp; Events</a>
						</li>
						<li>
							<a title="title here" class="sys_0 sys_t5966" href="#">Services</a>
						</li>
						<li>
							<a title="title here" class="sys_0 sys_t5966" href="#">Professionals</a>
						</li>
						<li>
							<a title="title here" class="sys_0 sys_t5966" href="#">Working for Us</a>
						</li>
						<li>
							<a title="title here" class="sys_0 sys_t5966" href="#">GPs</a>
						</li>
						<li>
							<a title="title here" class="sys_0 sys_t5966" href="#">Members</a>
						</li>
						<li>
							<a title="title here" class="sys_0 sys_t5966" href="#">Research</a>
						</li>
						<li class="sys_last">
							<a title="title here" class="sys_0 sys_t5966" href="#">Contact Us</a>
						</li>
					</ul>
</div>