skip to Main Content

I need to move my image a bit to the right, but not fully.
This is what I currently have,
and this is how I need it to look like.

This is the code I have for the image currently:

<div>
  <img src="../Hozier.png" width="245" height="600">
</div>

I am very new to HTML and really need some help. Thank you in advance.

3

Answers


  1. You can add margin to the left side of the img element with CSS.

    <div style="margin-left: 100px;"><img src="../Hozier.png" width="245" height="600"></div>
    

    You can change the 100px value to move the image to the right more or less as needed.

    Login or Signup to reply.
  2. You can do the following:

    <div>
        <img src="../Hozier.png" width="245" height="600" style="margin-left:100px;">
    </div>
    

    Or use positioning and other methods.
    But the following code seems to be useless:

    Login or Signup to reply.
  3. you can use position to move it style:"position: relative; left: 10px"

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search