Forums

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

Home Forums CSS Neebie need help for background picture.

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #264641
    RockAtanskY
    Participant

    Hi,

    i’m new in Code and i try to make my first project.

    I try to use a picture to make a background in Codepen but the picture don’t fit all the page even if i size it in 100%.
    How can i do that?

    Thank you for any help.

    Here’s the link to my codepen:
    https://codepen.io/RockAtansky/pen/JOgRrr?editors=0101

    #264644
    Shikkediel
    Participant

    You could try background-size: cover instead.

    But please do not start such unsolicited audio.

    #264645
    RockAtanskY
    Participant

    Thank you for your response and sorry for the audio it was for testing.

    Cover work but i lost half of the original picture, maybe it is the format of the picture…

    #264649
    Shikkediel
    Participant

    It’s a well-known conundrum to match any kind of screen size… one would either get some empty space or part of the image will be cut off in either direction. If the latter becomes too much, you could use a media query to fit another background image with a better matching aspect ratio.

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