albertg Posted October 7, 2008 Share Posted October 7, 2008 I have a page layout issue I have been been pulling my hair out for 6 hours. I'm not sure if its a CSS issue or an HTML. If anyone has any suggestions I would really appreciate it. Here is a link to a screenshot of the formatting problem: http://swrtx.com/images/formatting_issue.jpg Here is the PHP thtml code for the page: <?php $nav = NULL; if ( isset( $userInfo ) ) { echo $profile->showUserinfo( $userInfo['User'], $userInfo['User']['is_employer']); $nav = $userInfo['User']['is_employer']; } else { $box = $this->requestAction( '/text_pages/getText/7', array( 'return' => true ) ); echo "<div class=\"content\">"; echo "<h2><img src=\"/img/arrow.gif\" /> ".$box['TextPage']['title']."</h2>"; echo $box['TextPage']['body']; echo "</div>"; } echo $profile->userNav($nav); $skillChapters = $this->requestAction( "/skill_chapters/getSkillChapters", array( "return"=>true ) ); ?> <div class="contenttop"> <h2><img src="/img/arrow.gif" /> Search Jobs</h2> <?php echo $form->create( 'Job', array( 'action' => 'index' ) )."\n"; echo "<div class=\"row\">"; echo "<div class=\"floatThird\">"; echo "<div class=\"floatClear\">"; echo "<label>Skill Set</label>"; foreach ($skillChapters as $skillChapter) { $currid = $skillChapter['SkillChapter']['id']; echo "<div class=\"selectSkill\">"; echo "<div class=\"floatLeft\" onclick=\"showHide('showchapter".$currid."', 'showRightMinus".$currid."', 'showRightPlus".$currid."')\">".$skillChapter['SkillChapter']['title']."</div>"; echo "<div class=\"floatRight\" onclick=\"showHide('showchapter".$currid."', 'showRightMinus".$currid."', 'showRightPlus".$currid."')\">"; echo "<span class=\"showElement\" id=\"showRightPlus".$currid."\">+</span><span class=\"hideElement\" id=\"showRightMinus".$currid."\">(close)</span>"; echo "</div>"; $skillCategories = $skillChapter['SkillCategory']; echo "<div class=\"hideSkillBox\" id=\"showchapter".$currid."\">"; $iteration =0; foreach ($skillCategories as $idx=>$skillCategory) { echo (($idx !=0) && ($idx%3 ==0) ) ? '<hr>' : ''; echo "<div class=\"skillset\">"; echo "<div class=\"skillCategory\">"; echo $skillCategory['title']; echo "</div>"; $skills = $skillCategory['Skill']; foreach ($skills as $skill) { $skillid = $skill['id']; $skillIds[] = array("skill".$skill['id'],$skill['title'],$skillChapter['SkillChapter']['title']); echo "<div class=\"skillRow\">"; echo "<input type=\"checkbox\" name=\"data[Job][skill".$skillid."]\" value=\"1\" id=\"skill".$skillid."\"> "; echo "<label for=\"skill".$skillid."\">{$skill['title']}</label>"; echo "</div>"; } echo "</div>"; $iteration++; } echo "</div>"; echo "</div>"; } echo "<p class=\"error-message\">".$errormessage."</p>"; echo "</info>"; echo "</div>"; echo '<script type="text/javascript">'; echo 'var SKILLS = ['; for ($i=0; $i < count($skillIds); $i++) { echo '["'.$skillIds[$i][0].'","'.$skillIds[$i][1].'","'.$skillIds[$i][2].'"]'; if ($i < count($skillIds)-1) { echo ","; } } echo '];'; echo '</script>'; echo "<div id='selectedSkills' style='display:none;'></div>"; echo "<div class=\"floatClear\">"; echo "<div id=\"skillsbox\" class=\"hideElement\">"; echo "<div class=\"floatLeft\">"; $curr = 0; foreach ( $skillsArr as $index => $skill ) { if ($curr % $percols == 0) { echo "</div><div class=\"floatLeft\">"; } echo "<div class=\"checkbox\"><input type=\"checkbox\" name=\"data[Job][skill".$index."]\" value=\"1\" id=\"Job".$skill."\"> ".$skill."</div>"; $curr++; } echo "</div>"; echo "</div>"; echo "</div>"; echo "</div>"; echo "<div class=\"floatThird\">"; echo "<div class=\"floatClear\">"; echo "<label>Location</label>"; echo $form->input( 'country', array( 'label'=> false, 'type'=>'select', 'options'=> array( 'United States' => 'United States' ) ) ); $state = null; if ( !empty( $this->data['Job']['state'] ) ) { $state = $this->data['Job']['state']; } echo $profile->stateSelector( $state, 'data[Job][state]','zipfinder_state' ); if ( !empty( $this->data['Job']['city'] ) ) { $city = $this->data['Job']['city']; echo '<div id="zipfinder_city_div"><select name="data[Job][city]" id="zipfinder_city"><option value="">Any City</option>'; $cities = ''; foreach ($cityRecords as $index => $record) { $cities .= "<option value=\"{$record['zipcodes']['city']}\">{$record['zipcodes']['city']}</option>\n"; } $cities = str_replace( "value=\"$city\"", "selected=\"selected\" value=\"$city\"", $cities ); echo $cities; echo '</select></div>'; } else { echo '<div id="zipfinder_city_div"><select name="data[Job][city]" id="zipfinder_city"><option value="">---</option></select></div>'; } /* if ( !empty( $this->data['Job']['zip'] ) ) { $city = $this->data['Job']['city']; $zip = $this->data['Job']['zip']; echo '<div id="zipfinder_zipcode_div"><select name="data[Job][zip]" id="zipfinder_zipcode"><option value="">Any Zip Code</option>'; $zips = ''; foreach ($zipRecords as $index => $record) { $zips .= "<option value=\"{$record['zipcodes']['zipcode']}\">{$record['zipcodes']['zipcode']}</option>\n"; } $zips = str_replace( "value=\"$zip\"", "selected=\"selected\" value=\"$zip\"", $zips ); echo $zips; echo '</select></div>'; } else { echo '<div id="zipfinder_zipcode_div"><select name="data[Job][zip]" id="zipfinder_zipcode"><option value="">---</option></select></div>'; } */ $ajaxOptions['url'] = '/zipcodes/jobZipFinder/city'; $ajaxOptions['update'] = 'zipfinder_city_div'; echo $ajax->observeField( 'zipfinder_state', $ajaxOptions ); //$ajaxOptions['url'] = '/zipcodes/jobZipFinder/zipcode'; //$ajaxOptions['update'] = 'zipfinder_zipcode_div'; //echo $ajax->observeField( 'zipfinder_city', $ajaxOptions ); echo $form->input( 'zip', array( 'label' => 'or Zip Code', 'maxlength' => 5 ) ); echo "</div>"; echo "<div class=\"floatClear\">"; echo $form->input( 'distance', array( 'label' => 'Distance within', 'type'=>'select', 'options'=> array( '' => 'Any Distance', '40' => '40 Miles', '80' => '80 Miles', '100' => '100 Miles' ) ) ); echo "</div>"; echo "<div class=\"floatClear\">"; echo $form->input( 'posted', array( 'label' => 'Posted within', 'type'=>'select', 'options'=> array( '' => 'Any Time', '30' => '30 Days', '60' => '60 Day', '90' => '90 Day' ) ) ); echo "</div>"; echo "</div>"; echo "<div class=\"floatThird\">"; echo "<h4 class=\"marBot\">Show only:</h4>"; echo "<div class=\"checkbox\"><input type=\"checkbox\" name=\"data[Job][full_time]\" value=\"1\" id=\"JobFull-time\"><label for=\"JobFull-time\">Full-Time</label></div>"; echo "<div class=\"checkbox\"><input type=\"checkbox\" name=\"data[Job][part_time]\" value=\"1\" id=\"JobPart-time\"><label for=\"JobPart-time\">Part-Time</label></div>"; echo "<div class=\"checkbox\"><input type=\"checkbox\" name=\"data[Job][contract]\" value=\"1\" id=\"JobContract\"><label for=\"JobContract\">Contract</label></div>"; echo "<div class=\"checkbox\"><input type=\"checkbox\" name=\"data[Job][telecommute]\" value=\"1\" id=\"JobTelecommute\"><label for=\"JobTelecommute\">Telecommute</label></div>"; echo "<h4 class=\"filter\">Filter by:</h4>"; echo "<div class=\"checkbox\"><input type=\"checkbox\" name=\"data[Job][sponsorship]\" value=\"1\" id=\"JobSponsorship\"><label for=\"JobSponsorship\">Provides Sponsorship</label></div>"; echo "</div>"; echo "<div class=\"button buttonLeft floatClear\"><input type=\"submit\" value=\"Search\" /></div>"; echo '<p>Didn\'t find your skill set? <a href="/users/contact">Click here to submit a new skill set.</a></p>'; echo "</div>"; echo "</form>"; ?> </div> (edited by kenrbnsn to add tags) Link to comment https://forums.phpfreaks.com/topic/127392-cleaning-up-php-layout-problemhelp/ Share on other sites More sharing options...
Wahooka Posted October 9, 2008 Share Posted October 9, 2008 aloha, this i only a error in your css file/table-orders. you have to change the table-sizes and site-orders for this. when you dont find the error pls let show me your CSS file an make this as a attachment to your reply Link to comment https://forums.phpfreaks.com/topic/127392-cleaning-up-php-layout-problemhelp/#findComment-660745 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.