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
Gabriel E
8,916 PointsIs there really anyway to align img elements to the middle of page?!
Really all I want is to have the images to be aligned to the middle of the page no matter what size the browser.
1 Answer
Christopher Collins
Front End Web Development Techdegree Student 6,343 PointsHi Gabriel,
Have you considered using a combination of the 'position: absolute:' along with 'top: 50%, left: 50%;' declarations?
Theoretically, this should set your element 50% down from the top and 50% over from the top-left corner of the browser window.
Gabriel E
8,916 PointsGabriel E
8,916 Pointshey thx Christopher! That did pretty much entirely what I needed!