Site with Responsive objects!

Asked

Viewed 146 times

-1

I’m developing a website in BootStrap! He’s doing very well in a matter of being Responsivo.

Only, Background is working as planned only on PC’s, we already smartphones He’s even cool, but by dragging the page background kind of goes down, but right down, about 10 or 20 pixels turns white!

Question: How do I resolve this?

I tried to use:

@media (min-width: 400px) {
    body {

        background-color: #ff0080;
    }
}

BODY code:

    body {
        background-image: url ( "http://fullhdpictures.com/wp-content/uploads/2016/04/Amazing-Clash-Royale-Wallpaper.jpg");
 background-repeat: no-repeat;
 background-attachment: fixed;
 -webkit-background-size: cobertura;
 -moz-background-size: cobertura;
 -o-background-size: cobertura;
 background-size: cobertura;
    }

But every time I turn down the screen, CSS it all comes out and it’s just background!

Question: How to avoid this, just change what is inside the @media and the rest be original?

If you want I’ll make a Jsfiddle!

  • 1

    Post the link or a code that shows the problem happening. So we can analyze and help you.

  • 1

    Before closing the body tag, try to place a clearfix div to fill in the entire document. If possible, enter the code in Jsfiddle like you said.

  • poe margin:0 0 0; on your body q resolves and padding:0 0 0; tbm

  • OK but later do it

  • @Jasarorion could explain to me what the margin and the padding in the body is for?

  • margin is to move the body away from the sides and the padding serves to move the inner contents of the body away from it.

  • access this here http://www.devmedia.com.br/understandingos-attributes css-margin-e-padding/27969

  • jsfiddle does not have this problem

  • @Jasarorion ready, came to nothing, I want the background to be very fixed, and I want to change some classes by size! as inputs etc

  • a demo of the website: http://plantao-clashers.esy.es

  • just you make a media query for each size Chrome has an extension that fades the sizes of the Vices installs it

  • Every time I do this the whole css disappears and it’s just that it’s in the media

Show 7 more comments

1 answer

2


I understood your doubt despite not being very clear, it is a little difficult to assume the problem without analyzing when it comes to css, much may be happening in your code, as you are declaring the rules of that background? Have you tried using background-size: cover?
There is a great lib js to work with images and videos in backgrounds, call Backstretch, if none of this resolves, come back here with more details of your doubt, which I try to help

  • yes guy I’ll already put the body css!

  • 1

    Guy even paid worked perfectly this plugin ai!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.