HTML
<div class="morra-header">
<div class="morra-sub-header">
<h1>Header</h1>
</div>
</div>
<div class="morra-content">
<h2>Sticky footer with fixed navbar</h2>
</div>
<div class="morra-footer">
<div class="morra-sub-footer">
<div class="row">
<div class="col-md-4 center-block">
<div class="paper">.col-md-1</div>
</div>
<div class="col-md-4 center-block">
<div class="rock">.col-md-1</div>
</div>
<div class="col-md-4 center-block">
<div class="scissor">.col-md-1</div>
</div>
</div>
</div>
</div>
SCSS
/* Sticky footer styles
-------------------------------------------------- */
html {
position: relative;
min-height: 100%;
}
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
}
.morra-header{
@include clearfix;
background-color: #f5f5f5;
margin-bottom: 0;
min-height: $navbar-height;
left: 0;
padding-left: 0;
position: fixed;
right: 0;
top: 0;
z-index: $zindex-navbar-fixed;
}
.morra-sub-header{
@include clearfix;
@extend .container;
}
.morra-content{
margin-top: 60px;
@extend .container;
}
.morra-footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
background-color: #f5f5f5;
}
.morra-sub-footer {
@include clearfix;
@extend .container;
}
.my{
background: grey;
}
.morra-item{
height: 52px;
width: 52px;
background: #ff00ff;
}
.paper {
@extend .morra-item;
}
.rock {
@extend .morra-item;
}
.scissor{
@extend .morra-item;
}
My goal is center the content in the col-md-4 element
I don’t understand why on earth it doesn’t work
Can help me please ?
END UP but I’m waiting for a better way
<div class="morra-footer">
<div class="morra-sub-footer">
<div class="row">
<div class="col-md-4 morra-center">
<div class="paper">.col-md-1</div>
</div>
<div class="col-md-4 morra-center">
<div class="rock">.col-md-1</div>
</div>
<div class="col-md-4 morra-center">
<div class="scissor">.col-md-1</div>
</div>
</div>
</div>
</div>
.morra-center{
text-align: center;
}
.morra-item{
background: #ff00ff;
display: inline-block;
height: 52px;
width: 52px;
}