By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,993 Members | 1,883 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,993 IT Pros & Developers. It's quick & easy.

URLs display fine in Chrome and IE8, but not in Firefox 3.0.11

P: 21

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, "" is just "" in Firefox.

Any ideas why? The code is below.

Thanks in advance,


Expand|Select|Wrap|Line Numbers
  1. print "<td class='sitename'>".'<a href="http://'.$row['site'].'" class="links2">'.$row['site'].'</a>'."</td>";
Jun 29 '09 #1
Share this Question
Share on Google+
10 Replies

Expert Mod 5K+
P: 8,639
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)
Jun 29 '09 #2

P: 21
In FF, the source code says:

Expand|Select|Wrap|Line Numbers
  1. <td class='sitename'><a href="" class="links2"></a></td>
However, the page only displays "" in FF.

The source code is the same in Chrome and IE8.
Jun 29 '09 #3

P: 21
Is there a way to change the CSS to make URLs display correctly in Firefox?
Jun 29 '09 #4

Expert Mod 5K+
P: 8,639
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.
Jun 29 '09 #5

Expert 5K+
P: 5,058
Done ;-)
Jun 29 '09 #6

Expert 5K+
P: 5,058
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?
Jun 29 '09 #7

P: 21
Expand|Select|Wrap|Line Numbers
  1. print "<table class=\"navbar\">\n";
  2. print "<tr>";
  3. print "<td class='sitename'>".'<a href="http://'.$row['site'].'" class="links2">'.$row['site'].'</a>'."</td>";
The CSS:

Expand|Select|Wrap|Line Numbers
  1. table.navbar {
  2.        margin-left:44px;
  3.     margin-top:0px;
  4.     text-align: left;
  5.     font-family: Arial, Helvetica, sans-serif ;
  6.     font-weight: normal;
  7.     font-size: 12px;
  8.     color: #000000;
  9.     width: 700px;
  10.     background-color: #A7E6FE;
  11.     border: 1px #FFFFFF;
  12.     border-collapse: collapse;
  13.     border-spacing: 4px;
  14.     padding: 4px;
  15.     text-decoration: none;    
  16. }
  18. table.navbar td {
  19.    border: 2px solid #fff;  
  20.    text-align: left; 
  21.    height: 16px;
  22. }
  24. table.navbar td a{
  25.    padding: 3px;
  26.    display: block;
  27. }
  29. .sitename { width: 535px;
  30.             overflow:hidden;
  31. }
  33. a.links2:link {
  34.      color: #000000;
  35.     text-decoration: none;
  36.      text-align:left;
  37.     margin-top:6px;
  38.     margin-bottom:2px;
  39.     margin-left:2px;
  40.     padding:0px;
  41.     font-family:Arial, Helvetica, sans-serif;
  42.     font-size: 12px;
  43.     width: 10px;
  44.     height: 12px;
  45.     vertical-align:middle;
  46.      }
Jun 29 '09 #8

Expert 5K+
P: 7,435
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.
Jun 30 '09 #9

Expert 100+
P: 431
I think you need to remove "width: 10px;" from your a.links2:link


.sitename overflow:hidden; doesn't help
Jun 30 '09 #10

Expert 5K+
P: 5,058
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.
Jun 30 '09 #11

Post your reply

Sign in to post your reply or Sign up for a free account.