I have the following nested elements :
<div class="simple-score-bar">
<span class="score-heading">heading</span>
<div class="score-wrapper">
<div class="score-label">
<span>76</span>
</div>
<div class="score-chart">
<div>
<svg>
<g>
<rect width="400px" height="30px"></rect>
<g>
<rect width="100px" height="30px"></rect>
</g>
</g>
</svg>
</div>
</div>
</div>
Обертывание размер DIV элемент равен нулю
Вопрос заключается в том, что score-bar
и score-wrapper
высоты DIV являются 0, когда я осмотреть их. Интересно, почему это происходит.
CSS:
.simple-score-bar {
font-family :'Open Sans Bold', 'Open Sans';
.score-heading {
fill: #3D7CD1;
font-style: normal;
word-wrap: break-word;
font-size: 15px;
}
.score-wrapper {
.score-chart {
float: left;
width: 80%;
.score-legend {
font-size: 10px;
font-style: normal;
color: #778599;
line-height: normal;
font-family: 'Open Sans';
.score-left {
float: left;
}
.score-right {
float: right;
}
.score-text {
font-weight: 700;
}
.score-value {
font-weight: 400;
}
}
}
.score-label {
float:left;
word-wrap: break-word;
font-size: 16px;
font-style: normal;
margin-right: 3%;
}
}
}
плавающее содержание? –
обновленный вопрос css styling –
Ах да. плавающее содержимое. Очистите поплавки в конце. –