What is causing these huge gaps? - css

I am trying to display several items from a query onto this page. I am trying to make them so that 6 images are on a line and evenly spaced. However, it seems that no matter how I change the css, I still keep ending up with huge gaps in some places.
Here is the code I used to create this section:
<div class="container2">
<div class="category"><h2>All Items</h2></div>
<div class="display">
<?php do { ?>
<ul>
<li><a href="details.php?recordID=<?php echo $row_Master['Master_ID']; ?>"><img class="thumb" src="img/<?php echo $row_Master['Img']; ?>"/>
<br />
<?php echo $row_Master['Name']; ?></a></li>
</ul>
<?php } while ($row_Master = mysqli_fetch_assoc($Master)); ?>
<!-- end .display --></div>
<?php
mysqli_free_result($Master);
?>
<!-- end .container2 --></div>
and the CSS associated with it:
.container2 {
margin:0 auto;
text-align: center;
width:95%;
background-color:#FFFFFF;
}
.display{
width:100%;
margin-left:auto;
margin-right:auto;
text-align:center;
overflow:hidden;
}
.display ul li {
float:left;
max-width:15.67%;
margin: 0 0 8% 1%;}
.display ul{
list-style:none;
}
img.thumb {
border:0;
max-height:150px;
min-width:16.67%;
vertical-align:middle;
padding:3px;}
Can anyone help me remove these huge gaps, plz?

Flexbox for the win.
You can get six across wrapping rows with this config. The flex container gets:
display: flex;
flex-wrap: wrap;
And the flex items get:
flex: 0 0 16.666%;
I added several comments in the CSS to explain what I did here. This approach takes a bit of practice but once you get it you will never use floats for layout again.
Here is a great resource that explains the flexbox approach really well: https://css-tricks.com/snippets/css/a-guide-to-flexbox/
* { box-sizing: border-box; }
.display {
border: 2px solid red; /* just for demo visibility */
}
.display ul {
/* ul reset */
list-style: none;
padding: 0;
margin: 0;
/* flexbox layout - flex container config */
display: flex;
flex-wrap: wrap;
}
.display ul li {
border: 2px solid dodgerblue; /* just for demo visibility */
padding: 10px; /* use padding to create spacing between items, remove the borders to get the final look */
/* flex item config */
flex: 0 0 16.66%; /* 100 divided by 6 is 16.666... */
}
.display ul li span {
display: block;
text-align: center;
}
.display ul li img {
max-width: 100%;
height: auto;
}
<div class="container2">
<div class="category">
<h2>All Items</h2>
</div>
<div class="display">
<ul>
<li>
<a href="x">
<img class="thumb" src="https://picsum.photos/120" />
<span class="name">Thing 1</span>
</a>
</li>
<li>
<a href="x">
<img class="thumb" src="https://picsum.photos/120" />
<span class="name">Thing 2</span>
</a>
</li>
<li>
<a href="x">
<img class="thumb" src="https://picsum.photos/120" />
<span class="name">Thing 3</span>
</a>
</li>
<li>
<a href="x">
<img class="thumb" src="https://picsum.photos/120" />
<span class="name">Thing 4</span>
</a>
</li>
<li>
<a href="x">
<img class="thumb" src="https://picsum.photos/120" />
<span class="name">Thing 5</span>
</a>
</li>
<li>
<a href="x">
<img class="thumb" src="https://picsum.photos/120" />
<span class="name">Thing 6</span>
</a>
</li>
<li>
<a href="x">
<img class="thumb" src="https://picsum.photos/120" />
<span class="name">Thing 7</span>
</a>
</li>
<li>
<a href="x">
<img class="thumb" src="https://picsum.photos/120" />
<span class="name">Thing 8</span>
</a>
</li>
<li>
<a href="x">
<img class="thumb" src="https://picsum.photos/120" />
<span class="name">Thing 9</span>
</a>
</li>
<li>
<a href="x">
<img class="thumb" src="https://picsum.photos/120" />
<span class="name">Thing 10</span>
</a>
</li>
</ul>
</div>
</div>

Related

CSS technique for a horizontal line to the left of text with text align centre

I'm trying to achieve a solution where a horizontal line appears to the left of the text but the text remains centre aligned. Please see image below.
I've also added my mark-up below. I'm currently using Bootstrap 4.
<div class="text-center nav-items">
<ul>
<div class="pb-5">
<li>
<h2 class="sidebar-first-item">About</h2>
</li>
<p>Behind the brand // Meet the team</p>
</div>
<div class="pb-5">
<li>
<h2>Our Work</h2>
</li>
<p>Take a look at our marvelous creations</p>
</div>
<div class="pb-5">
<li>
<h2>Services</h2>
</li>
<p>Learn more about what we can do for you</p>
</div>
<div class="pb-5">
<li>
<h2 class="sidebar-last-item">Contact</h2>
</li>
<p>Get in touch today. Let's make some magic</p>
</div>
</ul>
</div>
Use pseudo-elements to do so:
.sidebar-first-item {
position: relative;
}
.sidebar-first-item:before {
content: '';
position: absolute;
width: 45%;
height: 5px;
background-color: red;
top: 50%;
left: 0%;
}
CodePen: https://codepen.io/manaskhandelwal1/pen/xxEaQYg
First cleanup your html, a <ul> list may not have children other than <li>, <script> or <template> elements (see The Unordered List element). Hence remove the div's inside the <ul> and add their classes to the <li>.
A solution to your design problem is to add a element before and after your anchor elements, size them (width) with a percentage you like and set a min-width for the anchor, so you have a nice responsive layout also on small devices. This creates an equal width red line
If you want the red line to align with the width of the text, you can make your anchor non-breaking white space and a set a padding, so the red line comes as close as defined in the padding towards the text.
.redline,
.spacer {
width: 100%;
height: 3px;
display: inline;
background-color: red;
}
.spacer {
height: 0px;
}
li {
display: flex;
align-items: center;
}
li a {
margin: 0 auto;
border: 0px solid gold;
padding: 0 20px;
white-space: nowrap;
}
li p {
width: 100%; margin:-50px 0 50px;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<div class="text-center nav-items">
<ul>
<li class="pb-5">
<span class="redline"></span>
<a href="#">
<h2 class="sidebar-first-item">About</h2>
</a>
<span class="spacer"></span>
</li>
<li>
<p>Take a look at our marvelous creations</p>
</li>
<li class="pb-5">
<span class="redline"></span>
<a href="#">
<h2>Our Work</h2>
</a>
<span class="spacer"></span>
</li>
<li>
<p>Behind the brand // Meet the team</p>
<li>
</ul>
</div>
This is where a CSS pseudo element can come into play! A pseudo element can be used to place designs before or after an element.
I added a class called horizontal-line to your h2.
<div class="text-center nav-items">
<ul>
<div class="pb-5">
<li>
<h2 class="horizontal-line sidebar-first-item">About</h2>
</li>
<p>Behind the brand // Meet the team</p>
</div>
<div class="pb-5">
<li>
<h2>Our Work</h2>
</li>
<p>Take a look at our marvelous creations</p>
</div>
<div class="pb-5">
<li>
<h2>Services</h2>
</li>
<p>Learn more about what we can do for you</p>
</div>
<div class="pb-5">
<li>
<h2 class="sidebar-last-item">Contact</h2>
</li>
<p>Get in touch today. Let's make some magic</p>
</div>
</ul>
The CSS will look like this.
.horizontal-line {
position: relative;
}
.horizontal-line::before {
content: "";
display: block;
width: 60px;
height: 2px;
position: absolute;
top: 50%;
left: 35%;
border-radius: 30px;
background-color: #DE657D;
}
By adding the pseudo element it will know to place it before any content with that class name. In this case, we are leaving content blank and placing in
https://jsfiddle.net/rc463gb8/1/

How to get a parent div to float/break into an L/wrap between children?

I thought I understood float, but clearly I don't.
I have a div (class="Sophia") made of a header ("h2"), and an unordered list ("ul") containing images that I want to collapse into an L-formation. Specifically I want the header (containg the text "sophia") to go into the gap that is under "Dorothy" and to the left of "Rose."
I realize that I could accomplish this by breaking the header out of the div, but for the sake of learning I want to know how to use CSS to style the div as a whole unit such that it "breaks" between elements into an L, such that the upper part of the L goes into empty space, just with CSS.
How things are now:
Kind of what the goal is:
If you know how to pull this off, I'd love it if you could show me how!
Thanks!
This is the codepen: http://codepen.io/ihatecoding/pen/WpBZpy
This is the snippet:
/* body formatting, not important */
body {font-family:"Gudea";
background-color: lightGray;
padding: 15px;}
.sophiaword{color:darkblue;}
h1 {text-align:center;}
a {text-decoration:none;
color:darkblue;}
.wrapper{
padding: 10px 25%;
width:50%;
}
/*this is the formatting that matters*/
.dorothy,
.rose,
.sophia {
float:left;
}
.dorothy,
.rose {
width:50%;
}
.sophia {
width:auto;
}
.dorothy li {
width:100%;
}
.rose li {
width:47%;
}
.sophia li {
width:20%;
display:block;
float:left;
}
.dorothy h2,
.rose h2,
.sophia h2{
color:black;
font-size: 40px;
margin:0;
}
li {
background-color: #f7f7f7;
margin:0 1% !important;
padding:0 !important;
width: 22%;
display: inline-block;
}
.cat-post-item span,
.cat-post-item a {
color: darkSlateGray;
font-weight: 700;
letter-spacing: -1px;
}
.cat-post-item img {
margin: 0 !important;
height: 150px;
object-fit: cover;
}
.cat-post-thumbnail span,
.cat-post-thumbnail img {
width:100% !important;
}
.sophia li {
width:20%;
display:block;
float:left;
}
<span><h1>I'd like to know how to use CSS and float to get the blue text "<span class="sophiaword">Sophia</span>" to flow so it breaks away from the row of sophia images, and ends up next to the left of the the bottom picture of rose. In the end I'd like the "sophia" div to make an "L"-shape, but stay as one div. Currently the div starts on a new line and I don't want that. </h1></span>
<div class="wrapper">
<div class=" dorothy">
<h2>
Dorothy
</h2>
<ul>
<li class='cat-post-item'>
<a class="cat-post-thumbnail" href="http://www.example.com" >
<span>
<img width="150" height="150" src="https://pbs.twimg.com/media/Buhe7x1CAAAIW02.jpg" class="attachment-150x150 size-150x150 wp-post-image" />
</span>
</a>
<a class="cat-post-title" href="http://www.example.com" >Dorothy (down there ↓)</a>
</li>
</ul>
</div>
<div class="rose">
<h2 >
Rose
</h2><ul >
<li class='cat-post-item'>
<a class="cat-post-thumbnail" href="http://www.example.com" >
<span><img width="150" height="148" src="http://www.dvdizzy.com/images/g-i/ggs2-12.jpg" class="attachment-150x150 size-150x150 wp-post-image" />
</span>
</a>
<a href="http://www.example.com" >Rose1</a>
</li>
<li class='cat-post-item'>
<a class="cat-post-thumbnail" href="http://www.example.com" >
<span>
<img width="150" height="112" src="http://www.dvdizzy.com/images/g-i/ggs2-12.jpg" class="attachment-150x150 size-150x150 wp-post-image" />
</span>
</a>
<a href="http://www.example.com" >Rose2</a>
</li>
<li class='cat-post-item'>
<a class="cat-post-thumbnail" href="http://www.example.com" >
<span>
<img width="147" height="150" src="http://www.dvdizzy.com/images/g-i/ggs2-12.jpg" class="attachment-150x150 size-150x150 wp-post-image" />
</span>
</a>
<a href="http://www.example.com" > ( ← over there ) Rose3 </a>
</li>
<li class='cat-post-item'>
<a class="cat-post-thumbnail" href="http://www.example.com" >
<span>
<img width="92" height="150" src="http://www.dvdizzy.com/images/g-i/ggs2-12.jpg" class="attachment-150x150 size-150x150 wp-post-image" />
</span>
</a>
<a href="http://www.example.com" >Rose4 </a>
</li>
</ul>
</div>
<div class=" sophia">
<h2 class="widget-title">
Sophia
</h2>
<ul >
<li class='cat-post-item'>
<a class="cat-post-thumbnail" href="http://www.example.com" >
<span>
<img width="150" height="101" src="http://underscoopfire.com/wp-content/uploads/2013/02/sophia-petrillo.jpg" class="attachment-150x150 size-150x150 wp-post-image" />
</span>
</a>
<a href="http://www.example.com" >Sophia1</a>
</li>
<li class='cat-post-item'>
<a class="cat-post-thumbnail" href="http://www.example.com" >
<span>
<img width="150" height="101" src="http://underscoopfire.com/wp-content/uploads/2013/02/sophia-petrillo.jpg" class="attachment-150x150 size-150x150 wp-post-image" />
</span>
</a>
<a href="http://www.example.com" >Sophia2</a> </li><li class='cat-post-item'>
<a class="cat-post-thumbnail" href="http://www.example.com" >
<span> <img width="150" height="101" src="http://underscoopfire.com/wp-content/uploads/2013/02/sophia-petrillo.jpg" class="attachment-150x150 size-150x150 wp-post-image" />
</span>
</a>
<a href="http://www.example.com" >Sophia3</a>
</li>
<li class='cat-post-item'><a class="cat-post-thumbnail" href="http://www.example.com" >
<span>
<img width="150" height="101" src="http://underscoopfire.com/wp-content/uploads/2013/02/sophia-petrillo.jpg" class="attachment-150x150 size-150x150 wp-post-image" />
</span>
</a>
<a href="http://www.example.com" >Sophia4</a>
</li>
</ul>
</div>
</div>

Bootstrap navbar appears differently in Firefox and Chrome due to browser rendering inconsistencies

The screenshot below is my bootstrap navbar which works nicely (pills disappear one by one as per spec). However when scaled down to various screen sizes, the navbar is no longer in-line and becomes staggered.
The issue is worse in Chrome than in Firefox because the left hand section of the navbar does not sit at the top of the screen.
If I can get Chrome to look like the Firefox screenshot, this will help me fix the remaining issues.
Can anyone suggest which browser rendering inconsistency would explain why on the Chrome version, the left hand portion of the navbar does not sit flush with the top of the screen?
Top is Chrome, bottom is FireFox.
<header>
<div class="vr-nav-container" data-ng-controller="navBarController">
<div>
<div class="col vr-nav-col1">
<div class="nowrap">
<nav class='navbar navbar-default navbar-static-top no-padding" role="navigation"'>
<a class='navbar-brand' href='/Default'>
<img height="30" class="logo" alt="Flatty" src="/Assets/images/logo-small-rocket-lg.png" />
<img height="30" id="xs-toggler" class="logo-xs" alt="Flatty" src="/Assets/images/logo_xs.png" />
</a>
</nav>
</div>
</div>
<div class="col vr-nav-col2 fill center">
<div class="nowrap">
<nav class='navbar navbar-default navbar-static-top " role="navigation"'>
<div class="tabbable ">
<ul class="nav nav-pills contrast-background">
<li data-ng-repeat="item in NavBarViewModel">
<a href="{{item.Path}}"><i class="{{item.Icon}}"></i>
{{item.Title}}
</a>
</li>
</ul>
</div>
</nav>
</div>
</div>
<div class="col vr-nav-col3">
<div class="nowrap">
<nav class='navbar navbar-default navbar-static-top" role="navigation"'>
<ul class='nav'>
<li ng-controller="awardBoxController" class='dropdown medium only-icon widget'>
<a class='dropdown-toggle' data-toggle='dropdown' href='#'>
<i class='icon-trophy'></i>
<div class='label'>{{AwardSummary.TotalPoints}}</div>
</a>
<ul class='dropdown-menu'>
<li>
<div class="box-content box-statistic">
<h3 class="title text-error">{{AwardSummary.Level}}</h3>
<small>{{AwardSummary.TotalPoints}} points</small>
<div class="text-banana icon-trophy align-right"></div>
</div>
</li>
<li><a href="/#/Awards/My-Points/">
<div class='points-history box-content widget-body'>
<div class='pull-left icon'>
<i class='icon- text-banana'></i>
</div>
<div class='pull-left text'>
<span><strong>Point History</strong> <span class="see-all">- see all</span></span>
<small class='text-muted'>{{award.AcheivedDate}}</small>
</div>
</div>
</a></li>
<li ng-repeat="award in AwardSummary.Awards">
<a href='#'>
<div class=' box-content widget-body'>
<div class='pull-left icon'>
<i class='icon-{{award.Icon}} text-success'></i>
</div>
<div class='pull-left text'>
{{award.Name}}
<span class="text-muted">+{{award.Points}}</span>
<small class='text-muted'>{{award.AcheviedDate| fromNow}}</small>
</div>
</div>
</a>
</li>
<li class='divider'></li>
<li class='widget-footer'>
<a href='/#/Awards/High-Scores/'>High Scores</a>
</li>
</ul>
</li>
<li class='dropdown medium user-menu'>
<a class='dropdown-toggle' data-toggle='dropdown' href='#'>
<img width="23" height="23" src="/Assets/images/avatar.jpg" />
<span class='user-name'>
<asp:Literal ID="UserFirstNameLiteral" runat="server" meta:resourcekey="UserFirstNameLiteral">FirstName LastName</asp:Literal></span>
<b class='caret'></b>
</a>
<ul class='dropdown-menu'>
<li>
<a href='/UserAccount/UserProfile'>
<i class='icon-user'></i>
<%= this.GetGlobalResourceObject("MasterPage","Profile") %>
</a>
</li>
<li>
<a ng-if="ShowSettings" href='/Settings/Dashboard'>
<i class='icon-cog'></i>
<%= this.GetGlobalResourceObject("Resources","Settings") %>
</a>
</li>
<li>
<a ng-if="ShowSettings" href='http://todo.help.vr.zendeskurl.com'>
<i class='icon-bullhorn'></i>
<%= this.GetGlobalResourceObject("MasterPage","GetHelp") %>
</a>
</li>
<li class='divider'></li>
<li>
<form runat="server">
<asp:LinkButton ID="SignOutLinkButton" runat="server" OnClick="SignOutLinkButton_Click" meta:resourcekey="SignOutLinkButton">
<i class='icon-signout'></i> <%= this.GetGlobalResourceObject("Resources","SignOut") %>
</asp:LinkButton>
</form>
</li>
</ul>
</li>
</ul>
<div class='navbar-form navbar-right hidden-xs'>
<button class='btn btn-link dropdown-toggle' style="top: 4px;" name='button' data-toggle="dropdown" type='submit'><i class="icon-search"></i><span class="caret"></span></button>
<ul class="dropdown-menu">
<li>
<a category="" class="searchoption" href="#"><%= this.GetGlobalResourceObject("MasterPage","Everything") %></a>
</li>
<li class="divider"></li>
<li>
<a category="Deals" class="searchoption" href="#"><%= this.GetGlobalResourceObject("Resources","Deals") %></a>
</li>
<li>
<a category="Contacts" class="searchoption" href="#"><%= this.GetGlobalResourceObject("Resources","Contacts") %></a>
</li>
<li>
<a category="Accounts" class="searchoption" href="#"><%= this.GetGlobalResourceObject("Resources","Accounts") %></a>
</li>
<li>
<a category="Tasks" class="searchoption" href="#"><%= this.GetGlobalResourceObject("Resources","Tasks") %></a>
</li>
</ul>
<div class='form-group'>
<input value="" id="searchBox" class="form-control" placeholder='<%= this.GetGlobalResourceObject("Resources","Search") %>...' autocomplete="off" id="q_header" name="q" type="text" />
</div>
</div>
</nav>
</div>
</div>
</div>
</div>
</header>
CSS
I am using the default bootstrap 3.0 CSS and have a seperate CSS file overriding some default CSS and adding my own
I had to do this because the pills section has to be in its own div in the centre column in order to work (disappear one by one and 'stack' as width decreases) and fill all the width between the left and right cols in the navbar.
.navbar-collapse:after {
clear: none;
}
.sorting, .sorting_asc, .sorting_desc {
background : none;
}
.top-buffer {
margin-top: 20px !important;
}
.removeclass{
font-size: 1.5em;
vertical-align: middle !important;
}
.removeclass:hover{
text-decoration: none;
}
.vr-navigation {
float: left;
width: 100%;
}
.rightnav {
float: right;
width: 285px;
margin-left: -160px;
}
.leftnav {
margin-right: 160px;
padding:0 10px;
width:auto;
height: 40px;
}
.nav-pills {
height: 40px;
}
.hidden-xs {
display: inline-block !important;
}
#media (max-width: 767px) {
.hidden-xs {
display: none!important;
}
}
.current {
font-weight: bold;
}
.nav-pills li a {
color: white;
}
.vr-nav-container
{
display: table;
}
.vr-nav-container > div
{
display: table-row;
}
.vr-nav-container > div > div
{
display: table-cell;
}
.vr-nav-container > div > div
{
padding: 0em;
}
.vr-nav-container .nowrap
{
white-space: nowrap;
}
.vr-nav-container .fill
{
margin: 0 auto;
}
.vr-nav-container .center
{
text-align: center;
}
.vr-nav-col1
{
/*background: red;*/
width: 5%;
min-width: 50px;
white-space: nowrap;
}
.vr-nav-col2
{
width: 50%;
margin: 0 auto;
/*background: yellow;*/
}
.vr-nav-col3
{
/*background: green;*/
width: 40%;
/*min-width: 260px;*/
}
.no-padding
{
padding-left: 0px !important;
padding-right: 0px !important;
}
.main-nav-closed #main-nav .navigation > .nav > li:hover > a.toggler-flyout > span
{
display: none;
}
/*.main-nav-closed #main-nav .navigation > .nav > li:hover > a.toggler-flyout > i
{
content: "\f061";
}*/

horizontal list with image and text

For each list item, I want an image with text below the image.
I read on this technique, but it is not supported in IE. Instead, I'm floating the list items to the left. It does the trick except the content below the list wraps to the right. How do I prevent the content from wrapping this way?
Here is my code:
<style>
.horizlist{
list-style:none;
text-align:center;
}
#menulist ul{
width:360px;
}
#menulist li{
float:left;
padding-right:50px;
}
#menulist li img{
display:block;
}
</style>
<div id="container" style="">
<div id="top">
<img src="joblove.jpg" style="float:right;">
<div id="title" style="width:500px;text-align:center;">
<h1>"THE TOUGHEST JOB YOU'LL EVER LOVE:"</h1>
<p style="font-size: 1.6em;">A RESOURCE FOR THOSE THINKING ABOUT A CAREER IN DIRECT CARE</p>
</div>
</div>
<div id="menulist">
<ul class="horizlist" >
<li>
<img src="images/purplestyle_11_home.png"></img><span>Home</span>
</li>
<li>
<img src="images/purplestyle_01_heart.png"><span>Brochure</span>
</li>
<li>
<img src="images/purplestyle_05_cut.png"><span>Video</span>
</li>
<li>
<img src="images/purplestyle_15_buddies.png"><span>Personality</span>
</li>
<li>
<img src="images/purplestyle_03_folder.png"><span>Resources</span>
</li>
<li>
<img src="images/purplestyle_02_talk.png"><span>FAQ</span>
</li>
</ul>
</div>
<img src="phone.jpg">
<ul class="horizlist">
<li><button type="button">Click </li>
<li></li>
</ul>
</div>
Add an height to #menulist in css :
#menulist ul{
width:360px;
height:100px;
}
Use CSS backgrounds. They give you more control over image positioning and require less mark-up.
HTML:
<a class="home" href="home">Home</a>
CSS:
.horizlist a {
display:block;
background-repeat:no-repeat;
padding-top: 20px;
padding-left: 20px
background-position: 10px 10px;
a.home {
background-image:url(/images/purplestyle_11_home.png);
}
Can can adjust the padding and background-position values to suit. Repeat as needed.

Boxes not aligning correct

I have tested my code on jsfiddle and it looks fine but for some reason on the live site the boxes have lost the alignment Why? it loads the first two boxes fine
HTML:
<div class="listingContainer">
<h2></h2>
<div class="sectionListingAttributes">
<div class="col0">
<span class="name">Property type:</span>
<span class="value">Section</span><br/>
<span class="name">Price:</span>
<span class="value">To be sold by auction on 4 Dec</span><br/>
<span class="name">Land area:</span>
<span class="value">301m²</span>
</div>
</div>
<div class="description">
<span class="value text">
</span>
</div>
<div class="gallery">
<div class="flexslider loading">
<ul class="slides">
{{ files:listing folder="10" }}
<li><img src="{{ url:site }}files/large/{{ filename }}" alt="" /></li>
{{ /files:listing }}
</ul>
</div>
</div>
</div><!-- listingAttributes End -->
<h2></h2>
<div class="sectionListingAttributes">
<div class="col0">
<span class="name">Property type:</span>
<span class="value">Section</span><br/>
<span class="name">Price:</span>
<span class="value">To be sold by auction on 4 Dec</span><br/>
<span class="name">Land area:</span>
<span class="value">333m²</span>
</div>
</div>
<div class="description">
<span class="value text">
</span>
</div>
<div class="gallery">
<div class="flexslider loading">
<ul class="slides">
{{ files:listing folder="12" }}
<li><img src="{{ url:site }}files/large/{{ filename }}" alt="" /></li>
{{ /files:listing }}
</ul>
</div>
</div>
</div><!-- listingAttributes End -->
<h2></h2>
<div class="sectionListingAttributes">
<div class="col0">
<span class="name">Property type:</span>
<span class="value">Section</span><br/>
<span class="name">Price:</span>
<span class="value">To be sold by auction on 4 Dec</span><br/>
<span class="name">Land area:</span>
<span class="value">300m²</span>
</div>
</div>
<div class="description">
<span class="value text">
</span>
</div>
<div class="gallery">
<div class="flexslider loading">
<ul class="slides">
{{ files:listing folder="13" }}
<li><img src="{{ url:site }}files/large/{{ filename }}" alt="" /></li>
{{ /files:listing }}
</ul>
</div>
</div>
</div><!-- listingAttributes End -->
<h2></h2>
<div class="sectionListingAttributes">
<div class="col0">
<span class="name">Property type:</span>
<span class="value">Section</span><br/>
<span class="name">Price:</span>
<span class="value">To be sold by auction on 4 Dec</span><br/>
<span class="name">Land area:</span>
<span class="value">301m²</span>
</div>
</div>
<div class="description">
<span class="value text">
</span>
</div>
<div class="gallery">
<div class="flexslider loading">
<ul class="slides">
{{ files:listing folder="14" }}
<li><img src="{{ url:site }}files/large/{{ filename }}" alt="" /></li>
{{ /files:listing }}
</ul>
</div>
</div>
</div><!-- listingAttributes End -->
</div> <!-- listingContainer End -->
CSS:
.listingContainer{
width:960px;
height:100%;
}
.listingContainer h2{
height:30px;
width: 100%;
margin: 10px 10px 0 10px;
}
.listingAttributes{
width:100%;
height:165px;
margin: 15px 10px -5px 10px;
border-bottom: 1px solid #FFB400;
}
.listingAttributes .col0, .col1{
width:160px;
height: 100%;
margin:0 15px 0 0;
float:left;
display: inline-block;
}
.listingAttributes .col2{
width:180px;
height: 100%;
margin:0 15px 0 0;
float:left;
display: inline-block;
}
.listingAttributes .col3{
width:200px;
height:100%;
float:left;
display: inline-block;
}
.listingAttributes .col4{
width:200px;
height:100%;
float:left;
display: inline-block;
}
.listingAttributes .sectionListingAttributes, .name{
font-weight: bold;
}
.sectionListingAttributes{
width:100%;
height:90px;
margin: 15px 10px -5px 10px;
border-bottom: 1px solid #FFB400;
}
.sectionListingAttributes .col0{
width:250px;
height: 100%;
margin:0 15px 0 0;
float:left;
display: inline-block;
}
.description{
width:930px;
min-height: auto;
max-height: 100%;
overflow: auto;
margin:0 0 0 10px;
padding: 10px;
border-bottom: 1px solid #FFB400;
}
.text, .value{
font-size: 14px;
text-align: left;
}
The first two are contained inside the div with id container and class w960 whereas all the rest are not.
UPDATE: Based on your code posted above, you have this line </div><!-- listingAttributes End --> about half way down that I believe you want to be closing the <div class="sectionListingAttributes"> element, however, that element is actually closed just after the <div class="col0"> is closed, so one of the two closings would seem to be incorrect.

Resources