SitePoint Sponsor |
|
User Tag List
Results 1 to 8 of 8
Thread: IE goin to kill me :((
-
May 22, 2005, 09:03 #1
- Join Date
- Apr 2004
- Location
- Hell
- Posts
- 7
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
IE goin to kill me :((
Hi, can anyone help me this problem
First, take a look at this picture: http://tanavn.info/tmp/ie.JPG
end then this's the site viewing in FireFox: http://tanavn.info/tmp/ff.JPG
WHY IE display like that( , FireFOx is very ok
(
if I display 20 record it'll create 20 BLANK LINE(
This is the source code
salons4sale.php
Code://header $header = & new Template('header'); $header->set('title', $itech->vars['site_name']); //left $left = & new Template('left'); $left->set('userbox', $print->show_userbox()); $left->set('statistic', $print->statistics()); //top $top = & new Template('top'); $top->set('title', $itech->vars['site_name']); //main $main = & new Template('salons4sale'); $main->set('list_salons', $print->list_salons()); //right $bottom = & new Template('right'); $bottom->set('title', $itech->vars['site_name']); $DB->close_db(); //footer $footer = & new Template('footer'); $footer->set('title', $itech->vars['site_name']); //all $tpl = & new Template(); $tpl->set('header', $header); $tpl->set('left', $left); $tpl->set('top', $top); $tpl->set('main', $main); $tpl->set('right', $bottom); $tpl->set('footer', $footer); echo $tpl->fetch('home');
Code://return last 20 salons for sale function list_salons(){ global $DB, $itech, $print; //prepare to paging result $paging = new Pager; //extra link to detail area $paging->extLink = 'act=salons4sale'; //how many project to display per page $limit = $itech->vars['num_salon_per_page']; // Find the start depending on $itech->input['page'] (declared if it's null) $start = $paging->findStart($limit); //how many salons that we have? $q = "SELECT SalonID, SalonName, DatePost, City, StateID, Views FROM ".$itech->vars['table_salons']." WHERE CURDATE() <= DateEnd ORDER BY DatePost DESC, SalonID DESC"; $query = $DB->query($q); //get the numbers of results $count = $DB->get_num_rows($query); $DB->free_result($query); if ($count==0){ $print->redirect('?act=contact', $lang['salon_fail'] ,'main page'); } else{ // Find the number of pages based on $count and $limit $pages = $paging->findPages($count, $limit); // Now we use the LIMIT clause to grab a range of rows $q .= " LIMIT ".$start.", ".$limit; //execute the query $query = $DB->query($q); $tpl = & new Template('s_salon'); $data = ''; $ct = 1 + $limit * ($itech->input['page'] - 1); while ($result = $DB->fetch_row($query)){ $tpl->set('num', $ct); $tpl->set('sid', $result['SalonID']); $tpl->set('sname', $result['SalonName']); $tpl->set('sdate', $this->mydate($result['DatePost'])); $tpl->set('scity', $result['City']. '/' .$this->get_dropdown_states($result['StateID'], 1)); $tpl->set('sviews', $result['Views']); $data .= $tpl->fetch('s_salon'); $ct += 1; } if ($pages > 1){ $data .= ($pages>5) ? '<tr><td colspan="4"><div align="center">('.$pages.') '.$paging->pageList($itech->input['page'], $pages).'</div><br></td></tr>' : '<tr><td colspan="4"><div align="center">'.$paging->pageList($itech->input['page'], $pages).'</div><br></td></tr>'; } $DB->free_result($query); } return $data; }
Code:class Template { var $vars, $file; function Template($file = null) { $this->file = $file; } function set($name, $value) { $this->vars[$name] = is_object($value) ? $value->fetch() : $value; } function fetch($file = null) { global $itech, $lang; if(!$file) $file = $this->file; extract($this->vars); ob_start(); include($itech->vars['templateFolder'].$file.$itech->vars['templateType']); $contents = ob_get_contents(); ob_end_clean(); return $contents; } }
Code:<tr> <td><table width="480" align="center" cellpadding="3" cellspacing="1" bgcolor="#EBEFF5" class="form"> <tr bgcolor="#728AB8"> <td><div align="center" class="style1"><strong>#</strong></div></td> <td height="22" bgcolor="#728AB8"><div class="style1" style="padding-left:5 "><strong><?=$lang['salon_name']?></strong></div></td> <td><div align="center" class="style1"><strong><?=$lang['salon_date']?></strong></div></td> <td><div align="center" class="style1"><strong><?=$lang['salon_city']?></strong></div></td> </tr> <?=$list_salons?> </table> </td> </tr>
Code:<tr bgcolor="#FFFFFF"> <td align="center"><?=$num?></td> <td><a href="?act=viewsalon&id=<?=$sid?>"><?=$sname?></a></td> <td align="center"><?=$sdate?></td> <td align="center"><?=$scity?></td> </tr>
-
May 22, 2005, 12:20 #2
- Join Date
- Dec 2003
- Location
- Albany, New York
- Posts
- 1,355
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
This isn't a PHP problem as PHP is run server-side. Try checking the HTML that is outputted and posting that in the HTML forum.
-
May 22, 2005, 13:00 #3
Try the HTML/CSS forum. They'l help you better.
-
May 22, 2005, 20:34 #4
- Join Date
- Apr 2004
- Location
- Hell
- Posts
- 7
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Young Twig
-
May 22, 2005, 20:43 #5
- Join Date
- Apr 2004
- Location
- The great white north
- Posts
- 293
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
At a glance it looks like a bug that you would get if you were using css and Divs for the layout and the amount of horizontal space that you had for the middle section exceeded what was available. Therefore the browser was unable to float the two areas side by side and had to bump the middle part below the part on the left.
-
May 22, 2005, 21:16 #6
- Join Date
- Feb 2005
- Posts
- 581
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Please do not cross-post. If you need a thread moved, PM a moderator and they will do it for you.
Edit:
Thanks to the mod who took care of this!I will not flame the newbies,
I will not flame the newbies,
I will flame the newbies...
Table free is the way to be!
-
May 22, 2005, 22:25 #7
- Join Date
- Apr 2004
- Location
- Hell
- Posts
- 7
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
OMG, what will I do now
-
May 23, 2005, 19:08 #8
- Join Date
- Apr 2004
- Location
- Hell
- Posts
- 7
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
then noone can help me
Bookmarks