URLs display fine in Chrome and IE8, but not in Firefox 3.0.11 | Newbie | | Join Date: May 2009
Posts: 21
| |
Hello,
My site prints out URLs in a table. In Chrome and IE8, the URLs look great. In Firefox 3.0.11, the URLs only display up until the second forward slash.
So for example, "nytimes.com/pages/world/americas/index.html" is just "nytimes.com/pages" in Firefox.
Any ideas why? The code is below.
Thanks in advance,
John - print "<td class='sitename'>".'<a href="http://'.$row['site'].'" class="links2">'.$row['site'].'</a>'."</td>";
|  | Moderator | | Join Date: Aug 2008 Location: Leipzig, Germany
Posts: 3,662
| | | re: URLs display fine in Chrome and IE8, but not in Firefox 3.0.11
is the source code different in FF? (different browser display is usually caused by HTML/CSS/JS issues since PHP execution is not affected by the browsers)
| | Newbie | | Join Date: May 2009
Posts: 21
| | | re: URLs display fine in Chrome and IE8, but not in Firefox 3.0.11
In FF, the source code says: - <td class='sitename'><a href="http://en.wikipedia.org/wiki/Miami" class="links2">en.wikipedia.org/wiki/Miami</a></td>
However, the page only displays "en.wikipedia.org/wiki" in FF.
The source code is the same in Chrome and IE8.
| | Newbie | | Join Date: May 2009
Posts: 21
| | | re: URLs display fine in Chrome and IE8, but not in Firefox 3.0.11
Is there a way to change the CSS to make URLs display correctly in Firefox?
|  | Moderator | | Join Date: Aug 2008 Location: Leipzig, Germany
Posts: 3,662
| | | re: URLs display fine in Chrome and IE8, but not in Firefox 3.0.11
the only suspect I have right now is the overflow property.
maybe you should ask a Moderator to move this thread to the HTML/CSS forum, those guys usually know more about browser bugs.
|  | Moderator | | Join Date: Nov 2006 Location: Iceland
Posts: 3,754
| | | re: URLs display fine in Chrome and IE8, but not in Firefox 3.0.11 Quote:
Originally Posted by Dormilich maybe you should ask a Moderator to move this thread to the HTML/CSS forum, those guys usually know more about browser bugs. Done ;-)
|  | Moderator | | Join Date: Nov 2006 Location: Iceland
Posts: 3,754
| | | re: URLs display fine in Chrome and IE8, but not in Firefox 3.0.11
You wouldn't have a link to this page, so we could see this for ourselves?
If not, could you post the CSS classes affecting the table?
| | Newbie | | Join Date: May 2009
Posts: 21
| | | re: URLs display fine in Chrome and IE8, but not in Firefox 3.0.11 -
print "<table class=\"navbar\">\n";
-
print "<tr>";
-
print "<td class='sitename'>".'<a href="http://'.$row['site'].'" class="links2">'.$row['site'].'</a>'."</td>";
The CSS: -
table.navbar {
-
margin-left:44px;
-
margin-top:0px;
-
text-align: left;
-
font-family: Arial, Helvetica, sans-serif ;
-
font-weight: normal;
-
font-size: 12px;
-
color: #000000;
-
width: 700px;
-
background-color: #A7E6FE;
-
border: 1px #FFFFFF;
-
border-collapse: collapse;
-
border-spacing: 4px;
-
padding: 4px;
-
text-decoration: none;
-
}
-
-
table.navbar td {
-
border: 2px solid #fff;
-
text-align: left;
-
height: 16px;
-
}
-
-
table.navbar td a{
-
padding: 3px;
-
display: block;
-
}
-
-
.sitename { width: 535px;
-
overflow:hidden;
-
}
-
-
a.links2:link {
-
color: #000000;
-
text-decoration: none;
-
text-align:left;
-
margin-top:6px;
-
margin-bottom:2px;
-
margin-left:2px;
-
padding:0px;
-
font-family:Arial, Helvetica, sans-serif;
-
font-size: 12px;
-
width: 10px;
-
height: 12px;
-
vertical-align:middle;
-
}
-
|  | Expert | | Join Date: Sep 2006
Posts: 5,577
| | | re: URLs display fine in Chrome and IE8, but not in Firefox 3.0.11
Showing us the PHP does us no good. We need to see the generated markup, but I think this is not going to be a HTML/CSS or Firefox problem.
|  | Member | | Join Date: Mar 2008 Location: here
Posts: 107
| | | re: URLs display fine in Chrome and IE8, but not in Firefox 3.0.11
I think you need to remove "width: 10px;" from your a.links2:link
also
.sitename overflow:hidden; doesn't help
|  | Moderator | | Join Date: Nov 2006 Location: Iceland
Posts: 3,754
| | | re: URLs display fine in Chrome and IE8, but not in Firefox 3.0.11 Quote:
Originally Posted by zorgi I think you need to remove "width: 10px;" from your a.links2:link
also
.sitename overflow:hidden; doesn't help Ahh, I see.
On line #26 of the CSS the <a> tags for that table are made block elements. That, coupled with the absolute width and the hidden overflow on the <td> would cause this.
The solution, therefore, is like zorgi suggested: remove the width from the link.
Removing either the display: block or the overflow: hidden would also work, but removing the width is probably best given that layout.
|  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,510 network members.
|