0

Hi, I am developing a website that has on online menu for a restaurant. The data is pulled from a database and displayed using several divs and a wrapper, this is then repeated to create a 2 column list (using block to display left to right).

The problem I am having is that sometimes it appears to skip a space although all records are still displayed e.g.

record1 | record2
record3 | record4
missing | record5
record6 | record7

or you can check out the website at www.marina-vista.co.uk. This happens at different intervals and since each seperate menu item is repeated I am unsure how this could happen when most records are displayed as normal.

Edited by pjh1985: n/a

3
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by MidiMagic
0

I thought you would be able to just check the website so the full code and css are available. Here is the code for the menu items anyway.

<?php do { ?>
        
      <div class="menu_list">
          <div class="food_name"><?php echo $row_menu['food_name']; ?></div>
          <div class="food_price"><?php echo $row_menu['food_price']; ?></div>
          <div class="food_desc"><?php echo $row_menu['food_description']; ?></div>
          <div class="clear"></div>
      </div>
      <?php } while ($row_menu = mysql_fetch_assoc($menu)); ?>
.menu_list {
	float: left;
	width: 50%;
	display: block;
	margin-bottom: 15px;
	padding-bottom: 5px;
}



.food_name {
	float: left;
	width: 220px;
	padding-bottom: 10px;
	color: #333;
	font-size: 17px;
	font-weight: 400;
}
.food_price {
	float: left;
	width: 70px;
	padding-bottom: 10px;
	font-size: 16px;
	color: #333;
}

.food_desc {
	width: 285px;
	float: left;
	color: #5F5F5F;
	overflow: visible;
	margin-bottom: 5px;
	padding-bottom: 5px;
}
0

I thought you would be able to just check the website so the full code and css are available. Here is the code for the menu items anyway.

Well you can't really see PHP code by looking on the website.

Maybe try to post this in the PHP section, it looks like a PHP issue..

0

I'm not sure if this is a php issue, it seems to me to be a problem with the layout. The repeating region appears to work properly however, when the issue occurs the container i use to format the repeated data (div id=menu_list_) is pushed across due to the difference in height in the previous divs. Every other time the divs are the same height even if the contents are different lengths.

I think for whatever reason the div above where the gap is appearing is causing the floated div below to be pushed across. I just cant find any reason why this would occur.

Edited by pjh1985: n/a

0

Two possibilities:

1. Missing or wrong separator in the data list used by the script.

2. The missing div is hiding under another div.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.