Here is my code:
This is some example text that i want next to th
you can do it without changing the html
structure
As img
is a inline
element you can set the next sibling p
to inline
By default p
is a block
element so it is taking full width
more about + selector
img + p {
display: inline;
margin-left: 10px;
vertical-align: top; /* so that p aligns to the top of img*/
}
This is some example text that i want next to the image on the right hand side