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 CSS Layout Techniques Display Modes Table Display

Michael Bredthauer
Michael Bredthauer
13,429 Points

using table for logo

in the video the logo starts out as a square, i am also working with a square logo. when you resize the browser the logo changes shape, how do i keep it as a square without having any crazy wrapping or overlapping issues?

1 Answer

Andrew Dushane
Andrew Dushane
9,264 Points

If you have a percentage value for the width of the image, the height should be set to auto (which should be its default value). If it's set to a fixed amount - ie pixels, it will keep the height fixed as the width changes according to its parent element, distorting it.