Home > Net >  Image not fitting in div, who can see for it
Image not fitting in div, who can see for it

Time:11-30

Hello everyone i am new with css. this is my website https://cvowebdesigner.be/22652/Yasin Altintas/wordpress/index.php/over-de-club/

the image is not fitting and it repeats. How can i fix this with css?

thank you

CodePudding user response:

You have to add !important to background properties, and it will work.

.page-title-section {
        background-position: top center !important;
        background-repeat: no-repeat !important;
        background-size: cover !important;
    /*rest of the code here*/
}

CodePudding user response:

Use these background CSS properties along with your background CSS property to avoid image repeats.

background-repeat: no-repeat;
background-size: cover;
background-position: 100% 30%;

CodePudding user response:

Set background-image and background-color separate instead of together. If you dont separate them they will override your values of background-repeat: no-repeat; with background-repeat-x: initial; and background-repeat-y: initial;.

Inline:

<section class="page-title-section" style="background-image:url('https://cvowebdesigner.be/22652/Yasin Altintas/wordpress/wp-content/uploads/2021/11/test-1.jpg'); background-color: #17212c;">   

With CSS:

background-image: url('https://cvowebdesigner.be/22652/Yasin Altintas/wordpress/wp-content/uploads/2021/11/test-1.jpg'); 
background-color: #17212c;
  •  Tags:  
  • css
  • Related