Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS background image is not responsive

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #209171
    andyellen
    Participant

    hey guys I am trying to display cover background with responsive but when I resize my browser to test the background image does not get expand and leaves white space on the right side. I want my background image on mobile version to display similarly as in desktop (cover)

    here is my code:

    http://codepen.io/anon/pen/zvZmWp

    and here is screen shot:

    https://muhammad_ali12-live.tinytake.com/sf/MzI0OTg3XzE5MTU2Mzg

    #209172
    Beverleyh
    Participant

    Unfortunately the CodePen doesn’t demonstrate the problem you describe, or look anything like the provided image.

    #209176
    andyellen
    Participant

    Hey I have updated my pencode CSS

    please take a look a now and see what I am doing wrong.

    thank you

    #209177
    Beverleyh
    Participant

    I still dont see the problem you describe. Also, we only need the pertinent markup and CSS, so strip it back to just the necessary parts to demonstrate the issue you’re having.

    #209178
    andyellen
    Participant

    Ok! I have again cleaned my code and now its to the point

    you can see my section with the “ID hero” has background color but you can see its not fitting on the screen. there is white space. I want it to be full screen even in mobile devices.

    I hope it makes a sense now.

    here is my pencode

    https://codepen.io/anon/pen/zvZmWp

    #209179
    Beverleyh
    Participant

    Seems to be a completely different problem to that illustrated by your original image, but if you’re referring to the default margins on the body tag, you can zero them with
    body { margin:0 }

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.