Search code examples
cssimagebackgroundsetting

How to set the background image full-width


i want to set the background with full like this image (must responsive)

enter image description here

but when i applied it look like this and crop the below part.

https://dl.dropboxusercontent.com/u/180176008/test1/index.html

Please somebody help me ?


Solution

  • Try below example.

    HTML

    <body class='imgclass'>
        <b>Test page</b>
    </body>
    

    CSS

    .imgclass{
        background-size:cover;
        background-image:url("https://dl.dropboxusercontent.com/u/180176008/test1/Home-Page.jpg") ;
    
    }
    

    I hope it can help you Fiddle