Bummer! You must be logged in to access this page.

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

HTML

HTML alignment

Currently when the page is full size details 1 - 3 are one row and details 3 - 6 are on another as the screen gets a little bit smaller 1 - 2 are on one row than 3 is by its self and 4 - 5 together and 6 by its self 6

Id like it to go to please -

1 and 2 together 3 and 4 together 5 and 6 together as the screen gets smaller.

Finally on mobile it looks fine as they are shown below each other .

<article class="col-sm-12 col-md-12 center">


                        <a href="/details1/" class="col-sm-6 col-md-4 col-md-offset-0 pic-button">
                            <div>    
                                <img src="/details1.png" class="img-responsive" alt="details 1">                        
                                <p>Details 1 ... </p>
                            </div>
                        </a>

                        <a href="/details2/" class="col-sm-6 col-md-4 col-md-offset-0 pic-button">
                             <div>    
                                <img src="/details2.png" class="img-responsive" alt="details 2">                        
                                <p>Details 2 ... </p>
                            </div>
                        </a>

                        <a href="/details3/" class="col-sm-6 col-sm-offset-0 col-md-4 col-md-offset-0  pic-button">
                             <div>    
                                <img src="/details3.png" class="img-responsive" alt="details 3">                        
                                <p>Details 3 ... </p>
                            </div>                          
                        </a>

                        <a href="/details4/" class="col-sm-6 col-md-4 col-md-offset-0 margin-bottom pic-button">
                            <div>    
                                <img src="/details4.png" class="img-responsive" alt="details 4">                        
                                <p>Details 4 ... </p>
                            </div>
                        </a>

                        <a href="/details5/" class="col-sm-6 col-md-4 col-md-offset-0 margin-bottom pic-button">
                             <div>    
                                <img src="/details5.png" class="img-responsive" alt="details 5">                        
                                <p>Details 5 ... </p>
                            </div>
                        </a>

                        <a href="/details6/" class="col-sm-6 col-sm-offset-0 col-md-4 col-md-offset-0  pic-button">
                             <div>    
                                <img src="/details6.png" class="img-responsive" alt="details 6">                        
                                <p>Details 6 ... </p>
                            </div>
                        </a>    



 </article>

1 Answer

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,254 Points

It seems to be working fine for me. Although I don't have access to your images so when I run it through JsBin I don't see them.

My tip would be to make sure your images are of equal size as well as your text content. But from my point of view the divs are aligning as you describe! :-)