Skip to main content

Forums

This topic contains 5 replies, has 3 voices, and was last updated by  manufufu 1 year, 7 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #261668

    manufufu
    Participant

    I don’t know why the image is not showing up….
    Any help?

    This is the HTML Code

    <div class="main">
             <div id="logo">
                 <div class="jumbotron"></div>
             </div>
    </div>
    

    This is the CSS Code
    #logo{
    background:url(background.jpg) no-repeat;
    background-size:cover;
    }

    #261672

    Paulie_D
    Moderator

    Can you make a demo in Codepen.io rather than just dumping some code?

    #261673

    manufufu
    Participant


    Here it is mate.
    Assume that there is bootstrap file in it….

    #261674

    Paulie_D
    Moderator

    Ahhh…you are using the shorthand.

    Just add the background-size as another line…

    or

    split the position/size keywords like position/size

    #261675

    bearhead
    Participant

    Your background declaration should look like this:

    background:url(https://i.ytimg.com/vi/n1sk-0k6ysc/maxresdefault.jpg) top left/cover no-repeat;
    
    #261827

    manufufu
    Participant

    Thanks @paulie_d and @bearhead

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

icon-link icon-logo-star icon-search icon-star