html - Odd gap between CSS containers -


the following css code:

.portrait  {  	width: 400px;  	position: relative;  	display: inline-block;  	background-color: #4e5555;  }    .portrait img  {  	width: 150px;  	float: left;  	padding-right: 20px;  }    .portrait h4  {  	text-align: left;  	margin: 0px 0px 0px 0px;  	color: #fff;  }

and following relevant html code:

<div class="portrait">  	<img src="images\filmmakers\aboui, julian\julianaboui-web.jpg">  	<h4>julian aboui</h4>  </div>  							  <div class="portrait">  	<img src="images\filmmakers\alter, aaron\aaronalter-web.jpg">  	<h4>aaron alter</h4>  </div>  							  <div class="portrait">  	<img src="images\filmmakers\abrahams, pia\piaabrahams-web.jpg">  	<h4>pia abrahams</h4>  	<h4>stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff stuff</h4>  </div>    <div class="portrait">  	<img src="images\filmmakers\asnani, shailen\shailenasnani-web.jpg">  	<h4>shailen asnani</h4>  </div>

my output following: http://i.imgur.com/yrkjvmn.png

i think know problem is, i'm not sure how fix it. last container element (on bottom right) placed further down because thinks under text. correct? i'm unsure how fix that.

any appreciated, thank you!

divs finicky. recommend using ul display:block inline. @ page source of web site can see working. snippet css works (i have div inside li withe text , multiple images)

div.list_holder {margin-bottom: 10px; clear: both; font-style:normal;} ul.user_list    {display:block; margin: 0px auto;} li.list_item    {list-style: outside none none; margin-right: -100%;                  position: relative; padding: 0px; clear: none;                  margin-bottom: 10px !important;                  border: 2px solid !important; min-height: 325px;                  max-width: 206px; float: left; margin-right: -100%;                  width: 23.5%;border-radius: 2px;} 

Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -