hello,

i echo this

echo "<td ALIGN='center'><div class='rollover'><a href='http://www.tsfdgdg.com/search.php?search=$stackname' style='text-decoration: none';>
            <table border='0' celpadding='0' cellspacing='0' id=\"point\">
<tr>
<td width='100px' height='101px' ALIGN='center'>
<font size=3 font face=Arial font color=white><b>$stackname</font><br><font color=orange font size=2>$posted</font></b>
</td>

</tr>

</table></a></div>
</td>";

here is the css code

<style type="text/css">
.rollover a {
float: left;


width: 101px;
height: 101px;


background: url("http://www.fdsgss.com/template.jpg");
text-decoration: none;
}
.rollover a:hover {

background: url("http://www.gdsgsgs.com/template2.jpg");

}

</style>

it works perfect in google chrome but in firefox the text moves out of the background... this is really annoying.. any help?

Recommended Answers

All 4 Replies

What text is moving outside of the box? When I test it in chrome and firefox both look the same to me. I am a bit curious about the echo as this is html and not php.

If you can provide a bit more information that would be great.

Why would you use echo? That is PHP
If it is a php script, I'd do

//...Bunch of php code
?>
<!-- .... All that HTML here -->
<?php

I wouldn't go into the trouble of echoing all that.

EDIT: Oh wait I see.
You really should do what I said but when it comes to the variables, do ....<?=$var;?>....

I think you must organized your coding well. Echo are used for Php scripting. If your trying to make a dynamic site using Php. But in the html coding should appear simple html or Css codings on it

hello,

i echo this

echo "<td ALIGN='center'><div class='rollover'><a href='http://www.tsfdgdg.com/search.php?search=$stackname' style='text-decoration: none';>
            <table border='0' celpadding='0' cellspacing='0' id=\"point\">
<tr>
<td width='100px' height='101px' ALIGN='center'>
<font size=3 font face=Arial font color=white><b>$stackname</font><br><font color=orange font size=2>$posted</font></b>
</td>

</tr>

</table></a></div>
</td>";

here is the css code

<style type="text/css">
.rollover a {
float: left;


width: 101px;
height: 101px;


background: url("http://www.fdsgss.com/template.jpg");
text-decoration: none;
}
.rollover a:hover {

background: url("http://www.gdsgsgs.com/template2.jpg");

}

</style>

it works perfect in google chrome but in firefox the text moves out of the background... this is really annoying.. any help?

You might wanna discard the values of attributes marked in red and see what happens. Or at least the 'width' part of it. And set the "display: block" to your A selector instead.


______________
p.s.:
sorry but your table nesting is in total mess - you should do something about it!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.