Hi folks,
I’m trying to center the contents of my div after it has been left-aligned, and it is not working. What I’m I doing wrong? Thanks in advance for your help.
See screenshot below:
Here is a link to my CodePen: https://codepen.io/IDCoder/pen/LBeXKG?editors=1100
Here is my code:
.skills-section{
height: auto;
background-color: #0099fe;
margin: auto;
position: relative;
padding: 5px;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
margin-top:15px;
}
@import url('https://fonts.googleapis.com/css?family=Roboto');
#fck {
color: red;
font-size: 20px;
text-align: left;
}
.parent {
font-family: 'Roboto';
counter-reset: my-counter;
margin: auto;
}
.item {
position: relative;
padding-left: 30px;
font-size: 14px;
line-height: 20px;
margin-bottom: 5px;
}
.item:before {
color: white;
background-color: #000;
border-radius: 50%;
counter-increment: my-counter;
content: counter(my-counter);
display: inline-block;
height: 20px;
line-height: 20px;
left: 0;
margin-right: 5px;
position: absolute;
text-align: center;
width: 20px;
}
.notification{
position: absolute;
width: 30px;
height: 30px;
border-radius: 5px;
left: 63%;
background-color: #ff0000;
}
#number{
font-size: 1.5em;
line-height: 0;
position: absolute;
top: 16px;
left: 8px;
color: white;
}
.skills-section:before{
position: absolute;
top: 0;
right:0;
bottom: 80%;
left: 0;
background: #0099fe;
}
#skills{
line-height: .5em;
text-align: center;
font-size: 2em;
padding-top: 30px;
margin-top: 5px;
text-transform: uppercase;
color: #bfbdbd;
}
.skills-box{
height: auto;
padding: 15px;
border: 1px solid #0099fe;
margin-bottom: 15px;
color: #5b5b5b;
text-align: left;
}