Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Image is moving when i resize my broswer

Hello Everyone i got a problem i got 3 divs 2 with 2 images 1 next to the other and the Contect div that the 2 divs with the images are inside My problem is tha the second image is moving when i resize the browser

Here is code:

.chair{
    position:absolute;
    float:left;
    width:306 ;
    height:437;
    min-width:0px;
    top:0px;
    left:0px;

    }
Content{
    width:1214px;
    height:437px;

    }

I've edited your code so it appears correct in your post.
Here is a link to explain how to use Markdown to post your code How to post code

1 Answer

Hey, I've got some suggestions that might help..

  1. Make your images responsive :
img {

max-width:100%;

}

2.Try using media queries and reposition the image at different screen sizes:

  1. If you are laying out the page using floats, make sure you clear floats where appropriate:
.clearfix:before,
.clearfix:after {
  content: "";
  display: table;
}

.clearfix:after {
  clear: both;
}

.clearfix {
  zoom: 1; /* ie 6/7 */
}