If I want to make a div in-line with other inline elements of the container div, and my purpose is to just that and nothing else, should I prefer using inline-block or display property or inline-flex? Cannot use spans as there are some overriding styles on span in the project and I'm prohibited from inline-styling. Are there any pros and cons between inline-flex and inline-block? What should be the standard to follow to do this?
I don't see any difference in the output from both. Maybe I'm working on a very simplistic model to see any difference. I read some questions regarding box model, inline-block and inline-flex but couldn't find any content emphasizing on pros and cons of using inline-flex vs inline-block.
Sample code to be something like:
.contentContainer {
height: 40px;
padding: 10px;
}
.contentLabel {
margin-left: 10px;
color: red;
display: inline-flex;
width: 25%;
}
.content {
margin-left: 10px;
display: inline-flex;
width: 70%;
}
<div class="contentContainer">
<div class="contentLabel">Name</div>
<div class="content">Some Random Name</div>
</div>