The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Programming Fundamentals" Dec 02 - 2:00 PM Eastern

Resizable Background Images

  • # March 22, 2012 at 10:22 am




    div { width: 70%;}
    h1 {background:url(bg.png) no-repeat;}

    I want to make the background image set on the h1 tag resize and also maintain aspect ratio as the width of the div (which h1 is nested inside) changes. The width of the bg.png is 200px.

    Thanks a lot!

    # March 22, 2012 at 10:42 am

    This reply has been reported for inappropriate content.

Viewing 2 posts - 1 through 2 (of 2 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