Skip to content Skip to sidebar Skip to footer

Css - Html | Fixing Of Background Via Css

i made a simple page in html and managed by css i need to managed the background of this page i use div id for background but now i want to remove the code from html page and manag

Solution 1:

I think what you need is:

body {
    background-image: url('here goes some address');
    background-size:cover;
    background-attachment: fixed;
}

but not sure if I understood you corectly

Solution 2:

Your question is unclear.. But according to what i understood you wanna simplify it for mobile version.. You can try colors or gradients that are already available in html and CSS.. This would also make the page load faster in mobile version than an image

Solution 3:

i fix this background issue in #wrapper div basically i wana fix for the mobile user only background shows for the normal users but the user come from mobile so it shows diff i share code mention below.

Normal user coming from pc

#wrapper{
    background: url(ar/bg_ar2.jpg);
    background-attachment:fixed;
    background-repeat:no-repeat;
    margin:auto;
    width:1180px;
    height:750px;
    top:0px;
    left:0px;
    padding:0px;
    }

For mobile user

#wrapper{   
    background-image: none !important;
    margin:auto;
    width:auto;
    height:auto;
    top:0px;
    left:0px;
    padding:0px;
    }

Thanks everyone for your suggestions and ideas.

Post a Comment for "Css - Html | Fixing Of Background Via Css"