I'm trying to align elements vertically inside a div
, but I'm stuck with circles.
The red div
is 100% width
, with my code, but the vertical line does not show, and the circles (that are div
s or span
s with background image
s) are not in the middle.
My code:
.welcomeArea{
margin-top: 70px;
max-height: 98px;
height: 98px;
background-color: #293847;
}
.welcomeAreaContent{
line-height: 98px;
color: white;
margin-left: 5%;
margin-right: 5%;
}
.welcomeAreaContent > span {
display:inline-block;
}
.welcomeAreaContent .welcomeName{
font-weight: bold;
font-size: 1.7em;
}
.verticalLine {
border-left: thick solid #ff0000;
content: "";
}
.circle {
width: 50px;
height: 50px;
border-radius: 50%;
behavior: url(PIE.htc);
-moz-border-radius: 50px;
-webkit-border-radius: 50px;
border-radius: 50px;
margin-left: 32px;
display: inline-block;
}
.twittericon{
background: url('data:image/png;base64,...') no-repeat center;
background-color: white;
background-size: cover;
}
<div class="welcomeArea">
<div class="welcomeAreaContent">
<div class="welcomeName">
TEXT TEXT
<span class ="circle twittericon"></span>
</div>
<div class="verticalLine">
</div>
</div>
</div>
The result looks like the following which is not good at all: