Home > Software engineering >  Any mistakes with my code? Display always go to left. I cannot fix it
Any mistakes with my code? Display always go to left. I cannot fix it

Time:11-25

Here is the link

https://github.com/noel020395/projectno1 enter image description here

I m stuck here, unable to fix the layout issue. Any one could guide me the errors?

CodePudding user response:

body {width : 100 %} or body { margin-left :}

CodePudding user response:

first of all you can use @media screen on body 2 times, 1 width is set to 50% and another one is 100%.

@media screen and (max-width: 100%){
body{width: 100%;}}

CodePudding user response:

Your content isn't 100% width, so naturally, it will appear to align left. if you want a more centred look, specify a max-width and margin:auto.

Something like this

section {
    max-width: 1280px;
    margin: auto;
}

CodePudding user response:

put this div to your every car item

 <div >
                <a href="target_blank"><img src="https://baaylimo.sg/wp-content/uploads/2020/10/voxy-600x380.jpg"
                        width="300px" /></a>
                <p>Toyota </p>
            </div>
  • Related