Search code examples
htmlcssimagepositionfrontend

how can I move the position of my image to the left?


I am trying to move the position of my image to the left in this webpage, but everything im trying isnt working. here is my html code:

<div class="col-md-6 col-lg-6 pl-md-5 py-5">
                    <div class="row justify-content-start pb-3">
                  <div class="col-md-12 heading-section ftco-animate">
                    <h1 class="big">About</h1>
                    <h2 class="mb-4">About Me</h2>
                    <p>A small river named Duden flows by their place and supplies it with the necessary regelialia.</p>
                      <img src = 'static/images/aman.jpg' height = 400px width = 400px left = 200px>

Solution

  • There's no valid HTML attribute called left. You can move the image using the left property in CSS when combined with position: relative.

    <h1 class="big">About</h1>
    <h2 class="mb-4">About Me</h2>
    <p>A small river named Duden flows by their place and supplies it with the necessary regelialia.</p>
    <img src="http://placekitten.com/400" height="400px" width="400px" style="position:relative;left:200px">