php - Propogating checkboxes into grid list view -


ok site has form , within there locations section 3 states, select locations checkbox, county title on select checks towns/cities beneath , towns/cities checkboxes. heres php give better idea:

$str = '<input id="chkmaster" onclick="checkallenquirylocation();" type="checkbox" value="ar000" name="location[]" /> <strong>all locations</strong>'."\n"."<br>";     $sql = "select location_area_code, location_area_name emg_location_area";     $rs = $db->query($sql);     if ($db->get_num_rows($rs))     {          while ($row = $db->fetch_row($rs))         {             $str .= '<div id="loco-column">';             $area_code = $row['location_area_code'];             $area_name = $row['location_area_name'];             $str .= '<input onclick="checkall_'.$area_code.'()'.';" id="'.$area_code.'" type="checkbox" value="'.$area_code.'" name="location[]" /> <strong>'.$area_name.'</strong>'."\n"."<br>";             $xtpl->assign("function_id", $area_code);              $sql = "select location_code, location_name                      emg_location                      location_area_code='".$row['location_area_code']."'";             $rs1 = $db->query($sql);             if ($db->get_num_rows($rs1))             {                 while ($row1 = $db->fetch_row($rs1))                 {                     $k = $row1['location_code'];                     $v = $row1['location_name'];                     $str .= '<input id="'.$area_code.'_'.$k.'" type="checkbox" value="'.$k.'" name="location[]" /> '.$v."\n"."<br/>";                     $xtpl->assign("element_id", $area_code."_".$k);                     $xtpl->parse("main.area_check_all.element");                 }                 $xtpl->parse("main.area_check_all"); $str .= '</div>';             }          } 

i want these display this: ebay's grid list view if scroll down page you'll see how though listings different sizes fit inline , fill selected area perfectly.

i thought quite simple have looked around , way can see how more php there cleaner way in css knows about?

heres attempt css, works smaller list of locations seem stuck on right hand side of container:

#loco-column{ display:inline-block; max-height:200px; float:left; padding-left:10px; margin-bottom:20px; } 

many in advance :)


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -