-1
In yellow we have tag main
and in blue we have the aside
both as display: inline-block
would like to know why the aside
does not position from the top.
<main>
<section>
<article>
<img src="../mtKTM1024x600.jpg">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</article>
<article>
<img src="../mtKTM1024x600.jpg">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</article>
</section>
</main><aside><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p></aside>
because the 3 "Ivs" are part of a single column. Where the blue div understands that the "top" is already being filled, however, visibly the yellow Divs have a limited width, so behind the impression that there is a CSS "error".
– gleisin-dev
The ideal would be the use of CSS Grid Layout together with the properties grid-template-Columns and grid-template-Rows where you can split the page into 2 or more columns where in the first column will be filled with the yellow "Divs" and in the second column will be filled with the blue div (by default she will understand that only she is part of that fraction and puts herself at the top)
– gleisin-dev
It is worth mentioning that one must respect the dimensions, because on a page and/or resolution that has 100px wide, and its yellow div has 90px wide, plus the blue div with 50px, nothing will be adjusted automatically (assuming that the yellows having a width of 70px and blue with width of 30px all frame right)
– gleisin-dev
Because I should line up at the top?
– Sam