WordPress.org

Ready to get started?Download WordPress

Forums

background-size property not working in WordPress (1 post)

  1. dlynch95
    Member
    Posted 3 years ago #

    I recently created a WordPress site and used the CSS3 'background-size' property to stretch the background image and maintain the aspect ratio.

    Here is the code I used...

    html {
    background:url(images/WebsiteImage01.jpg);
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/WebsiteImage01.jpg', sizingMethod='scale');
    -ms-filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/WebsiteImage01.jpg', sizingMethod='scale');

    }

    And here is the site.

    However if you view the site in safari the image doesn't show up at all. The odd thing about this though is that if you view a page such as
    this onewhich uses the same markup, the page displays perfectly.

    Anyone have an idea about why this is happening?

Topic Closed

This topic has been closed to new replies.

About this Topic