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

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

Responsive image wider than fluid parent element

  • # January 13, 2013 at 3:53 pm

    I’ve got the following problem:

    In a responsive design with percentage widths, I want all content to have some space left and right. So I gave the parent container some padding instead of giving every content element a margin.

    Here is an [example Pen](

    The problem is that I want some big images with a specific class to fill out the full width of the container. With fixed widths I would just give it a negative margin and increase the width accordingly.

    But as everything should be percentage based, I can’t figure out the best way to do it.
    I got it working with just playing with the width values but it doesn’t feel right.

    Any ideas?

    # January 13, 2013 at 5:31 pm


    [Here…]( “”) how I would go about it.

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