skip to Main Content

how to spread the image to be in the width of the web page?

you can check the website Poklanjam

the image I want to enlarge if possible, this image of the city on the left.

what should be written as additional css

Thank you

2

Answers


  1. You can try this to make the image cover the entire page.

    .banner-search {
        
        background-image: url(https://www.poklanjamvam.com/wp-content/uploads/2022/11/city.svg);
        
         
        /* Full height */
        height: 100%;
                
        /* Center and scale the image nicely */
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
        }
    

    Alternatively you can also position it by adding padding on the sides so it appears better on other devices

    Login or Signup to reply.
  2. Just a suggestion

    The size of the image is not according to the elements created, try repeat and centre.

    .banner-search {
        background-image: url(https://www.poklanjamvam.com/wp-content/uploads/2022/11/city.svg);
        background-position: center;
        background-size: 35%;
        background-repeat: revert;
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search