SoS, My floats are off...

+1 John Strider · January 23, 2015
Anyone out there  willing to help a noob?

I'm trying to make a responsive website layout. 
but I cannot get my block elements to automatically center as you change the browser size. As of now they are left justified.

So for I've tried:
1. margin: 0 auto; (makes them too close to each other)
2. left: 50%; / left: -50%; (off center && elements interfere with one another )
3. display:inline-block; (puts the content below the sidebars)

But none of those techniques have worked in this context.(It is possible I screwed up when trying them though.)



This is what I have so far: http://codepen.io/JohnStrider/pen/GgEpzM

Thanks!!

Post a Reply

Replies

Oldest  Newest  Rating
0 Gabriel Badiola · February 4, 2015
Hello there :)

If you want a responsive design you should use either flexbox or media-queries to get the job done :)

https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries
http://www.w3schools.com/cssref/css3_pr_mediaquery.asp
http://css-tricks.com/logic-in-media-queries/

Hope it helps :D
  • 1

HTML / CSS / Web Design

107,010 followers
About

Discuss, share, ask, learn and teach HTML5 and CSS3.

Links
Moderators