相关疑难解决方法(0)

My inline-block elements are not lining up properly

All of the elements within .track-container should line up nice and in line, each side by side, constrained by the 200px height they've been given with no weird margins or padding. Instead, you have the strangeness that occurs in the aforementioned fiddle.

What is causing .album-artwork and .track-info to get pushed halfway down the page, and how can I fix it? Also, I acknowledge that a table may be a better way of approaching this whole setup, but I want …

html css

74
推荐指数
3
解决办法
4万
查看次数

css - 在带有display的元素上添加垂直空间:inline-block

我有一系列具有css属性显示的缩略图容器元素:inline-block但是当它们彼此相邻排列时,第二个元素在顶部比第一个元素有更多空间(参见附图).知道为什么会这样吗?有没有更好的方法将这些元素排列在一起?我知道漂浮他们可以解决这个问题,但看起来浮动并不是解决这个问题的最好方法.

这是我的代码:

HTML:

<article class="thumb_container">
    <div class="thumb_content">
        <img src="images/perlin.jpg" alt="Perlin Lines" class="thumb_img"/>
        <header class="thumb_header">Perlin Lines</header>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eget lectus ac libero iaculis interdum nec id tortor. quis, ullamcorper id nisi. Etiam ut.
            <a href="#">More...</a>
        </p>
    </div>
</article>

<article class="thumb_container">
    <div class="thumb_content">
        <img src="images/branching.gif" alt="Branching" class="thumb_img"/>
        <header class="thumb_header">Branching</header>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eget lectus ac libero iaculis interdum nec id tortor. quis, ullamcorper id nisi. 
            <a href="#">More...</a>
        </p>
    </div> …
Run Code Online (Sandbox Code Playgroud)

css alignment vertical-alignment css-float

14
推荐指数
1
解决办法
8578
查看次数

标签 统计

css ×2

alignment ×1

css-float ×1

html ×1

vertical-alignment ×1