I got into a trouble with the Week and Month as my demo below. Whenever I drag the mouse to the Week or Month, all of elements can't be in one line and it also hasn't a good look...
It must be like this:
- Week 1
- Week 2
- Week 3
- ...
- Week 48
and
- Month 1
- Month 2
- ...
- Month 12
Demo
HTML:
<!-- Make a menu with Yearly, Monthly and Weekly -->
<ul id="out_per_chart">
<li>
<div class="yearly">
<div class="title">2014</div>
<div class="container1">
<ul class="sub-menu1">
<li><a class="_link" href="/Lists/ChartIndex.aspx?Year=2014">Yearly</a>
</li>
<li>
<div class="monthly">
<div class="title">Monthly</div>
<div class="container2">
<ul class="sub-menu2"></ul>
</div>
</div>
</li>
<li>
<div class="weekly">
<div class="title">Weekly</div>
<div class="container3">
<ul class="sub-menu3"></ul>
</div>
</div>
</li>
</ul>
</div>
</div>
</li>
</ul>
CSS:
#out_per_chart li {
list-style-type: none;
}
.title {
border: 2px solid #2676ac;
padding: 10px 30px;
width: 30px;
color: #2676ac;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.title:hover {
border: 2px solid #259add;
cursor: pointer;
background: #259add;
color: #FFF;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.container1 {
position: absolute;
padding-left: -10px;
display: none;
}
.container2 {
position: absolute;
margin-top: -15px;
margin-left: 50px;
}
.container3 {
position: absolute;
margin-top: -15px;
margin-left: 50px;
}
._link {
text-decoration: none;
border: 2px solid #2676ac;
padding: 10px 30px;
width: 30px;
color: #2676ac;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
._link:hover {
text-decoration: underline;
cursor: pointer;
border: 2px solid #259add;
background: #259add;
color: #FFF;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}