This is an extension of Omar Abid's accepted answer. I started from this and had to make additional changes, so it will work in my example of the stated question.
I did this work with class names instead of identifiers, so I could call the same CSS in multiple instances. This gave me the opportunity to simulate two cells of equal size. In my example, I set a fixed size using ems so that it can maintain its appearance in different size ranges of desktop and desktop browsers (in my mobile CSS I have a different strategy).
To align the image in the left div, I had to make a separate block (the last in CSS code).
In most cases, this should be a question.
<div class="BrandContainer"> <div class="BrandContainerTitle"> <h1>...</h1> </div> <div class="BrandContainerImage"> <img alt="Demo image" src="..." /> </div> </div>
CSS:
.BrandContainer { width: 22em; } .BrandContainerTitle { vertical-align: top; float: right; width: 10em; } .BrandContainerImage { vertical-align: top; float: left; } .BrandContainerImage img { width: 10em; }
user4864716
source share