I´m working on a challenge for Front End Mentor on VSCode and I need the image and text to be RIGHT next to each other. Right now, they have too much space between them. I was thinking that it could be rectified by putting them both in a box. Am I right?
I copy and pasted the code into CodePen and a link is below. (The image doesn´t show up since it´s saved to my computer.)
For starters, definitely do not put a fixed width on the body element.
If you tell the image that it can only be half the size of its container then it will be half the size and it will be left aligned inside the container as all elements do by default (left to right writing).
You can set the image to display: block and use a left auto margin on it. Or you can make the image container a flex container and use justify-content: flex-end (without a flex-basis depending on the size you are going for)