I am trying to align items inside a div, I've read some questions but still have this doubt.
What I currently have:
The code is
.wrapper {
border: 1px solid black;
width: 50%;
display: flex;
align-items: center;
}
.image {
border: 1px solid green;
}
.title {
border: 1px solid blue;
margin-left: 1%;
}
p {
border: 1px solid red;
float: right; /* Does not work */
}
<div class="wrapper">
<span class="image">
<img src="http://opae.a-superlab.com/forum/styles/art_air/imageset/forum_read.png">
</span>
<span class="title">Category Title</span>
<p>Category description</p>
</div>
The float: right
for category description is NOT working :( I want it to be positioned in extreme right side of the block.
Setting margin-left
to an explicit length is not an option because the content of "category description" is variable.
Category description