stop background loading for mobile devices only (4 posts)

  1. fawkesblog2
    Posted 4 years ago #

    Is it possible to have my site background not load when being viewed on an ipad or smartphone?

    I would prefer in those instances to just have a color load.


  2. j.musick
    Posted 4 years ago #

    You can use an @media rule. Learn about them here: http://www.w3schools.com/css/css_mediatypes.asp

    You need to insert something like:

    @media handheld {
    body {background-image: none, background-color:#000}

    into the bottom of you style sheet.

  3. fawkesblog2
    Posted 4 years ago #

    I had to make that @media handheld and (max-device-width: 480px)

    and that allowed me to style the fonts for the iphone but i am still unable to do anything the effects the background for some reason.

    That has me stumped.

  4. Steven Jones
    Posted 4 years ago #

    It looks like your background is being entered 'inline' with your HTML.

    That's not a great way to do it. Move it to the CSS and then you'll have more control over it.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.