2 replies [Last post]
kiwis
kiwis's picture
Offline
Enthusiast
Last seen: 1 year 28 weeks ago
Timezone: GMT+12
Joined: 2009-03-07
Posts: 68
Points: 108

https://jsfiddle.net/er2z684c/

Before I added my Location is looked okay but it's pushed my first item down now?

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 year 40 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

Not tested

I suspect you're experiencing margin collapse. Try adding {padding-top: 1px;} to the LI or DIV element. Or, you may replace the 50px top margin with 50px top padding on the parent. If I'm right, the H2 collapses through div.card-block and .card-block's margin collapses through LI.

See https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

helldog2004
helldog2004's picture
Offline
Enthusiast
Netherlands
Last seen: 6 years 18 weeks ago
Netherlands
Timezone: GMT+2
Joined: 2014-03-02
Posts: 205
Points: 239

You can solve this easily by

You can solve this easily by adding float: left; on the .card
https://jsfiddle.net/er2z684c/11/ <-- updated

Check Maximum Webdesign for your online solutions