Here are two potential ways to solve this issue:
1st Option - Inline Block
To resolve this, simply create a class with inline-block styling.
CSS
.inline-block{
display: inline-block;
}
HTML
afdsgdf dfgsdf dsfgf
2nd Option - Float left
Another approach is to float all items in the same direction for a similar outcome. When using floats, it's recommended to contain them within a display: table
to prevent other elements from appearing below the floated items.
CSS
.pull-left{
float: left;
}
.row{
display: table;
}
HTML
<div class="row">
<img class="pull-left" src="http://i164.photobucket.com/albums/u8/hemi1hemi/COLOR/COL9-6.jpg">
<h1 class="pull-left">afdsgdf dfgsdf dsfgf</h1>
<img class="pull-left" src="http://i164.photobucket.com/albums/u8/hemi1hemi/COLOR/COL9-6.jpg">
</div>
Distinguishing Factor
In my live example here, both solutions achieve the desired outcome. However, there is a noticeable difference in spacing between the last two images.
The Float solution eliminates the space between images.
Both options are effective, but I recommend the first one in your scenario to avoid adding an extra div class="row"
.
I hope this explanation proves helpful!