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
John Gronley
137 PointsGetting widgets to align horizontally
Hello I am trying to get 6 image widgets to align in the middle-home widget on my site. When I put 6 image widgets in they stack on top of each other. can someone share with me the code for this? here is all I have in the style sheet:
/* =Home Middle ------------------------------------------------------------ */
.home-middle { padding: 30px 0 20px; background: #e9e9e9; }
.home-middle .listing-wrap { width: 250px; margin: 0 34px 15px 0; }
4 Answers
Matthew Underhill
20,584 PointsHi John,
This depends on your HTML. Please post the HTML here as well. If you have the images contained in DIV elements for example, they will stack up because of the DIV's default display property by the browser stylesheet. You need to use either float:left or display:inline to make them line up side by side.
Please post your HTML though to make further suggestions.
John Gronley
137 PointsThanks Matthew but I am a newbie at this and have tweaked Wordpress themes by trial and error. I had a fellow help me with the genesis extender by making 6 widgets for the home-center but these are not responsive and I would like to simply add some code to the center widget that is responsive so that these 6 widgets will show well on mobile devices. As far as the HTML I don't know what to post but if you would be kind enough to look at my site with firebug mabye you can help me? one of my sites that I tweaked is http://homesbymenefee.com I hope this is enough for you to look at?
Thanks,
John ps I have been so busy with work I can't even start this course that I paid a year for in January :(
Matthew Underhill
20,584 PointsHi John,
I'm confused. You say they stack up but they don't. They are shrinking in width but are still inline.
John Gronley
137 PointsSorry go to http://johnstestsite.org above the row of pics are two image widgets of maps that stack atop each other. I would like to get them horizontally. The row below was done in genesis extender but are not responsive and therefore no good