e1seix Posted September 11, 2007 Share Posted September 11, 2007 Bit confused why this is happening... echo "<table class='pag_table'>"; echo "<tr><td>"; $limitrow = $_GET['startrow']; $max = intval($numrows/$limit); if ($numrows%$limit) { // has remainder so add one page $max++; } if ($startrow>=2) { echo '<a href="'.$_SERVER['PHP_SELF'].'?Cat='.$_GET['Cat'].'&startrow='.($startrow-$limit).'"><img src="/PREV.gif" /></a>'; } if ($limitrow<(($max*$limit)-$limit)) { // not last page so give NEXT link echo '<a href="'.$_SERVER['PHP_SELF'].'?Cat='.$_GET['Cat'].'&startrow='.($startrow+$limit).'"><img src="/NEXT.gif" /></a><br /><br />'; } echo "</td></tr>"; echo "<tr><td>"; print '<div id="pagmenu">'; $startrow = $_GET['startrow']; $mid = ($startrow/$limit); $result = ($mid+1); echo "Page ".$result." of ".$max."<br /><br />"; print "</div>"; echo "</td></tr>"; echo "<tr><td>"; print '<span class="nummenu2">'; $max = intval($numrows/$limit); if ($numrows%$limit) { // has remainder so add one page $max++; } for ($i=1;$i<=$max;$i++) { echo '| <a href="'.$_SERVER['PHP_SELF'].'?Cat='.$_GET['Cat'].'&startrow='.($limit*($i-1)).'">'.$i.'</a> |'; } print "</span>"; echo "</td></tr>"; echo "</table>"; It seems to stack every digit vertically ie. | 1 || 2 || 3 | instead of | 1 | 2 | 3 | why is this? it works fine in Firefox, but not in IE. what could be causing it? EDITED BY WILDTEEN88: Please use code tags ( ) including code with posts. Thank you. Link to comment https://forums.phpfreaks.com/topic/68874-solved-links-appearing-vertically-in-ie/ Share on other sites More sharing options...
Psycho Posted September 11, 2007 Share Posted September 11, 2007 Well, that would be an HTML issue. Can you post the HTML output for those links? Link to comment https://forums.phpfreaks.com/topic/68874-solved-links-appearing-vertically-in-ie/#findComment-346176 Share on other sites More sharing options...
micah1701 Posted September 11, 2007 Share Posted September 11, 2007 right, i was gonna say, what dose the source code look like after being sent to the browser? perhaps the width is just not set in your <td> and its wrapping the text? Link to comment https://forums.phpfreaks.com/topic/68874-solved-links-appearing-vertically-in-ie/#findComment-346179 Share on other sites More sharing options...
e1seix Posted September 11, 2007 Author Share Posted September 11, 2007 the <td> width doesn't appear to make a difference. i'm confused cos i can't tell if the fault is in the php or the css .nummenu2 { color: #000000; font: normal 12px tahoma, verdana, arial, sans-serif; text-align: center; text-decoration: none; width:500px; } .nummenu2 a{ color: #000000; font: normal 12px tahoma, verdana, arial, sans-serif; text-align: center; text-decoration: none; width:500px; } .nummenu2 a:hover{ color: #000000; font: normal 12px tahoma, verdana, arial, sans-serif; text-align: center; text-decoration: underline; width:500px; } any help at all appreciated. the source output: <td><span class="nummenu2">| <a href="/byBrand.php?ID=4507&startrow=0">1</a> || <a href="/byBrand.php?ID=4507&startrow=20">2</a> |</span></td> Link to comment https://forums.phpfreaks.com/topic/68874-solved-links-appearing-vertically-in-ie/#findComment-346194 Share on other sites More sharing options...
micah1701 Posted September 11, 2007 Share Posted September 11, 2007 perhaps becasue you're setting the width of EACH link to the width of the table cell. try this for your CSS: .nummenu2 { text-align: center; width:500px; } .nummenu2 a{ color: #000000; font: normal 12px tahoma, verdana, arial, sans-serif; text-decoration: none; } .nummenu2 a:hover{ text-decoration: underline; } don't know if that will solve the problem, but either way, its cleaner code (note that you don't have to repeat css styles for child elements) Link to comment https://forums.phpfreaks.com/topic/68874-solved-links-appearing-vertically-in-ie/#findComment-346216 Share on other sites More sharing options...
Psycho Posted September 11, 2007 Share Posted September 11, 2007 i'm confused cos i can't tell if the fault is in the php or the css If it is a display issue then it is NOT the PHP. Unless you specifically code your PHP to react differently based upon the client used, the output is the same no matter what browser the client is using. IT will be either the HTML or CSS implementation. Link to comment https://forums.phpfreaks.com/topic/68874-solved-links-appearing-vertically-in-ie/#findComment-346248 Share on other sites More sharing options...
Psycho Posted September 11, 2007 Share Posted September 11, 2007 It is the width parameter in your styles that is causing the problem. Also, I would suggest changing how your are applying the styles" for example you should apply the width to the TD not the SPAN. Any you don't need to redefine a style for a sub-element if it will be the same as the parent/containing element: I would suggest ditching the span tags and use the TD as the parent element: .nummenu2 { color: #000000; font: normal 12px tahoma, verdana, arial, sans-serif; text-align: center; text-decoration: none; width:500px; } .nummenu2 a{ color: #000000; text-decoration: none; } .nummenu2 a:hover{ text-decoration: underline; } <td class="nummenu2">| <a href="/byBrand.php?ID=4507&startrow=0">1</a> || <a href="/byBrand.php?ID=4507&startrow=20">2</a> |</td> Link to comment https://forums.phpfreaks.com/topic/68874-solved-links-appearing-vertically-in-ie/#findComment-346255 Share on other sites More sharing options...
e1seix Posted September 11, 2007 Author Share Posted September 11, 2007 thank you all. worked a treat Link to comment https://forums.phpfreaks.com/topic/68874-solved-links-appearing-vertically-in-ie/#findComment-346438 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.