WordPress.org

Ready to get started?Download WordPress

Forums

stop background loading for mobile devices only (4 posts)

  1. fawkesblog2
    Member
    Posted 1 year 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.

    http://www.chrisfawkes.net

  2. j.musick
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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

Tags

No tags yet.