HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML Forums › Technical questions / Troubleshooting › inline-block with width auto not working properly with nested elements › Reply To: inline-block with width auto not working properly with nested elements
`<html>
<head>
<style>
.content-sub_section {
display : inline-block;
width : auto;
}
.content-field {
width : 50%;
display : inline-block;
float : left;
}
</style>
</head>
<body>
<div class=’layout-content-inline’>
<div class=’content-sub_section’>
<div>
<div>
<div class=’parent’>
<div class=’layout-content-inline_grid_double’>
<div class=’content-field’>
<div>
<div>
<span>100</span>
</div>
</div>
</div>
<div class=’content-field’>
<div>
<div>
<span>King</span>
</div>
</div>
</div>
<div class=’content-field’>
<div>
<div>
<span>50</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class=’content-sub_section’>
<div>
<div>
<div class=’parent’>
<div class=’layout-content-inline_grid_double’>
<div class=’content-field’>
<div>
<div>
<span>101</span>
</div>
</div>
</div>
<div class=’content-field’>
<div>
<div>
<span>Mark</span>
</div>
</div>
</div>
<div class=’content-field’>
<div>
<div>
<span>70</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>