Answer the question
In order to leave comments, you need to log in
Align DIV to top
I usually manage somehow on my own, but I've been sitting here for an hour now and I can't figure out how to solve the problem.
There is a code
Now the Right line is displayed opposite the Line2 line,
but how to make the floating div "stick" to the top edge and the contents of this div are displayed opposite the line Line1?
Line 1
Line2
RightLine
Answer the question
In order to leave comments, you need to log in
Perhaps moving the RightLine block to the beginning would be the most correct solution.
In case the problem needs to be solved in pure CSS:
<div style="width:300px;position:relative;">
Line 1
Line2
<div style="position:absolute;top:0;right:0;"> RightLine </div>
</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question