Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8999375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:10:19+00:00 2026-06-16T00:10:19+00:00

I have a container that has images inside. I use CSS columns and media

  • 0

I have a container that has images inside. I use CSS columns and media queries to determine my layout. I put a paragraph tag at the bottom and noticed extra space at the bottom of it. Here’s what i’m talking about in this fiddle. http://jsfiddle.net/sEe7x/11/. The weirdness is happening at the yellow and orange break points. Does anyone know what is causing this?

Here’s my code

-- HTML --

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width" />

    <title>Portraits</title>
    <meta name="description" content="">

    <link href='http://fonts.googleapis.com/css?family=Raleway:200' rel='stylesheet' type='text/css'>


</head>
<body class="photography">
    <nav class="site_navigation cf">
    <ul id="nav_drop" class="nav_links cf">
        <li class="nav_home"><a href="#">Home</a></li>
        <li class="nav_blog"><a href="#">Blog</a></li>
        <li class="nav_photography"><a href="#">Photography</a></li>
        <li class="nav_projects"><a href="#">Projects</a></li>
        <li class="nav_contact"><a href="#">Contact</a></li>
    </ul>
</nav>
        <div class="main photography_wrapper">        



            <h1>Portraits</h2>

            <div class="gallery_wrapper">
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a>                
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
            </div>

            <p>Random collection of portraits.</p>



            <div class="more_galleries">
                <h2>More Galleries</h2>
                <div class="more_gallery_photos">
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a> 
                    <a href="#"><img src="http://placedog.com/400/400" alt=""></a>                </div>
            </div>
        </div>

        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script src="http://dev.danielcgold.com/js/selectnav.min.js"></script>
    <script src="http://dev.danielcgold.com/js/functions.js"></script>

</body>
</html>​


-- CSS --

* {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -ms-box-sizing: border-box;
    box-sizing: border-box;
}

.cf:before,.cf:after {
    content: "";
    display: table;
}

.cf:after {
    clear: both;
}

.cf {
    *zoom: 1;
}

img {
    max-width: 100%;
}

body {
    font-family: Arial, sans-serif;
    font-size: 100%;
    background: #fffff6;
    margin: 0;
    padding: 2em;
    padding-top: 6.375em;
    color: #252525;
}

h1,h2,h3,h4,h5,h6 {
    font-family: serif;
    font-weight: normal;
    margin-bottom: 1em;
}

h1 {
    font-size: 3em;
}

p {
    line-height: 1.5em;
    word-wrap: break-word;
}

strong {
    font-family: 'pt_sans_captionbold', sans-serif;
    font-weight: normal;
}

a {
    color: #ff830a;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.selectnav {
    display: none;
}

.site_navigation {
    font-family: 'Raleway', sans-serif;
    font-weight: 200;
    background: #fff;
    padding: 1em;
    border-bottom: 0.063em solid rgba(0,0,0,0.15);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4.375em;
    -moz-box-shadow: rgba(0,0,0,0.15) 0 0 0.4em;
    -webkit-box-shadow: rgba(0,0,0,0.15) 0 0 0.4em;
    -o-box-shadow: rgba(0,0,0,0.15) 0 0 0.4em;
    box-shadow: rgba(0,0,0,0.15) 0 0 0.4em;
}

.site_navigation a {
    text-decoration: none;
    color: #444;
    display: block;
    margin: .5em;
    padding-bottom: .25em;
}

.nav_links {
    list-style: none;
    margin: 0;
    padding: 0;
    float: right;
}

.nav_links li {
    float: left;
}

.gallery_wrapper {
    -moz-column-count: 5;
    -webkit-column-count: 5;
    -o-column-count: 5;
    column-count: 5;
    line-height: 0;
}

.more_galleries {
    margin-top: 6em;
}

.more_gallery_photos {
    -moz-column-count: 5;
    -webkit-column-count: 5;
    -o-column-count: 5;
    column-count: 5;
}

.more_gallery_photos a {
    display: block;
    margin-bottom: 1em;
}

.gallery_wrapper a {
    display: block;
    margin-bottom: 1em;
}

.gallery_wrapper img {
    display: block;
    height: auto;
}


@media screen and (max-width: 60em) {

    .gallery_wrapper {
        -moz-column-count: 4;
        -webkit-column-count: 4;
        -o-column-count: 4;
        column-count: 4;
    }

    .more_gallery_photos {
        -moz-column-count: 4;
        -webkit-column-count: 4;
        -o-column-count: 4;
        column-count: 4;
    }

    .gallery_wrapper a {
        margin-bottom: 1em;
    }

    .more_gallery_photos a {
        display: block;
        margin-bottom: 1em;
    }
}

@media screen and (max-width: 48em) {

    .nav_links {
        float: left;
    }

    .gallery_wrapper {
        -moz-column-count: 3;
        -webkit-column-count: 3;
        -o-column-count: 3;
        column-count: 3;
    }

    .more_gallery_photos {
        -moz-column-count: 3;
        -webkit-column-count: 3;
        -o-column-count: 3;
        column-count: 3;
    }

    .gallery_wrapper a {
        margin-bottom: 1em;
    }

    .more_gallery_photos a {
        display: block;
        margin-bottom: 1em;
    }
}

@media screen and (max-width: 30em) {
    .site_navigation {
        height: 3.5em;
    }

    .nav_links {
        display: none;
    }

    .selectnav {
        display: block;
        margin-left: 1.5em;
    }

    .gallery_wrapper {
        -moz-column-count: 1;
        -webkit-column-count: 1;
        -o-column-count: 1;
        column-count: 1;
    }

    .more_gallery_photos {
        -moz-column-count: 2;
        -webkit-column-count: 2;
        -o-column-count: 2;
        column-count: 2;
    }

    .more_gallery_photos a {
        display: block;
        margin-bottom: 1em;
    }
}​
​

EDIT: The first fiddle was solved. I updated a JS fiddle with my real code stripped down and recreated the issue. I use SASS so the CSS is the output.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:10:20+00:00Added an answer on June 16, 2026 at 12:10 am

    It is because of image <img /> tag rendered as inline-block.

    img {display: block;}
    

    Fiddle: http://jsfiddle.net/nUGfe/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UIView container that has two UIImageView s inside it, one partially
I have an ExtJS Viewport with a container that has the border layout and
I have 3 list-items with background-images that are contained inside a div that has
I have a big <div /> container that has an image as a background.
I have a container that is a popup over a page and it has
I have a paging control on my site that has it's container element set
I have a mysql table that has 2 columns - Column 1 contains a
I have an input box that is inside of a div, the div has
I have a Custom Control that has multiple textbox fields and a checkbox contained
I have a xml that has so many elements and most of that contain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.