Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS

troy beckett
troy beckett
12,035 Points

Layout problems??

I was playing around with laying out some images in my text editor. I set the container width to 940px then I put three images inside this container with the widths 280px with two div inbetween these images width the width of 50px to give me the exact layout I wanted.

So,

layout: image div image div image (inside container 940px) all floated left;

280px+280px+280px+50px+50px=940px

when I took a look at it, the layout was perfect I came back two days later and now the third image is being knocked down. Why would this be happening. I've removed all margins and paddings. I'm using chrome as by browser. Wierd how it worked fine but not now.

1 Answer

CSS is like that. Our primitive brains cannot understand it. Or perhaps it was something to do with your browser cache not updating. DIfferent browsers have ways of mucking up your display. Have you viewed the page on another browser. Maybe try using a normalize.css to reset all the defaults before you create your own code.