<div id="wrap">
<!-- section -->
<div class="section">
<div class="center">
<div id="menu">
<div id="menu-list">
<div class="menu-item">
<span>menu item</span>
</div>
</div>
</div>
<button id="add">ADD MENU</button>
</div>
</div>
<!--/section -->
</div>
html,
body {
margin: 0;
padding: 0;
font-family: sans-serif;
font-size: 16px;
line-height: 1.4;
color: #555;
background: #fff;
}
* {
box-sizing: border-box;
}
#wrap {
position: relative;
}
.section {
padding: 40px;
}
.center {
width: 100%;
max-width: 980px;
margin: auto;
}
#menu {
width: 200px;
height: 300px;
box-shadow: 0 0 0 1px #000;
margin-bottom: 20px;
&-list {
padding: 3px 0;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
}
.menu-item {
box-shadow: inset 0 0 0 1px #aaa;
margin: 3px 6px;
flex: 1 0 auto;
background: fade(#00baff, 10%);
display: flex;
align-items: center;
padding: 0 6px;
font-size: 11px;
}
View Compiled
$(function () {
$('#add').click(function() {
$('.menu-item').last().clone().appendTo('#menu-list');
});
});
This Pen doesn't use any external CSS resources.