FlipFloop FlipFloop - 4 years ago 151
HTML Question

Why aren't my divs lining up correctly?

I am making a webpage with 2

div
s in a
div
, but the 2 smaller divs aren't lining up, here is an example: example

Here is my HTML:

<div id = "creators" class = "big-part">
<h3>Creators</h3>

<div class = "creator_name">
<h4>FlipFloop</h4>
<p>text text text text text text text text text text text text text text text text text text text text text text text texttext text text text text text text text text text text text text text text text text text text text text text text texttext text text text text text text text text text text text text text text text text text text text text text text text</p>
</div>
<div class = "creator_name">
<h4>TickTock</h4>
<p>text text text text text text text text text text text text text text text text text text text text text text text text</p>
</div>
<!--<div class = "creator_name">
<h4>Name</h4>
<p>Text</p>
</div>-->

</div>


and my CSS:

.creator_name {
width: 35%;
display: inline-block;
margin: 2% 2%;
}


when I use
float: left
: example2

Answer Source

try this:

.creator_name {
vertical-align:top;
}

jsfiddle link click here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download