My goal is to align the content of two divs
to the top within a parent div
.
I am unable to use display: flexbox
, and it needs to be implemented as inline CSS. Currently, the layout appears as intended when the description div
has only one line. However, if the description spans multiple lines, the number div
appears above the description div
. This is my current code:
<!--Single line-->
<div style="margin:10px 0 10px 0;">
<div style="display:inline-block; vertical-align:top"> 1.1</div>
<div style="margin-left:50px; display: inline-block; vertical-align:top;">
Lorem ipsum dolor sit amet, pertinax honestatis suscipiantur mea eu, populo invidunt nam ne, nulla similique usu et. His accusata definitionem in.
</div>
</div>
<!--Multiple lines-->
<div style="margin:10px 0 10px 0;">
<div style="display:inline-block; vertical-align:top">1.2</div>
<div style="margin-left:50px; display: inline-block; vertical-align:top;">
Id harum paulo bonorum vim, sit adhuc aliquid oportere in, ei quo dicta labitur salutatus. Debet doctus facilis ius ad, assum expetendis vix ex. Modus nostro concludaturque nec ad. No unum appellantur sea, assum oratio legere has et, est lorem concludaturque
id. Ex pro audire nostrud, vel sale dissentias an, eos no zril vocibus principes. Noluisse praesent mei ea. Eam intellegat omittantur ea, sit tacimates quaestio definitiones ei. Et vix appareat reprehendunt, at cum alii aliquando, audire iuvaret instructior
has eu. Sea id placerat ponderum, ea has deserunt assentior consectetuer. Nobis denique nominavi qui ut, cu prima idque perfecto eos. Quo soleat possit impedit eu. Id mucius graeci noluisse his. Sanctus appareat usu ne, per ea purto tractatos deterruisset.
</div>
</div>
I would like each item to be displayed similar to 1.1
:
https://i.sstatic.net/OcFMS.jpg