Get a free trial // Grow your CSS skills // Land your dream job

Dynamic Full Width Background Images

  • # December 12, 2012 at 6:24 pm

    For the background use

    background-size: cover;
    /* prefix me */

    I’m not shure but I think maybe php echo the image URL as html5 data- artibute and use css

    background: url(attr(data-image-URL));

    Hope it’s helpful.
    Maybe instead of html5 data- you could use rel.

Viewing 16 post (of 16 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed