I want firefox to treat the overflow:visible the same way as internet explorer (that means the incorrect way of stretching the div to fit the content)
a workaround with display: table-cell or something similar doesn't work in this instance
Here's the code, i hope somebody knows of a workaround:
http://www.top-download.net/test.php To see the problem in action
The problem is after the javascript is applied, so click the box
PHP Code:
<?
//LOGIN
define('IN_PHPBB', true);
$phpbb_root_path = 'forum/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
?>
<style>
div#box {
width: 200px;
height: 110px;
overflow: hidden;
border-left: 3px solid #000000;
border-right: 3px solid #000000;
border-bottom: 3px solid #000000;
border-top: 3px solid #000000;
}
</style>
<script>
function expand(id) {
var removable=document.getElementById(id);
if (removable.style.overflow == 'hidden') {
removable.style.overflow = 'visible';
} else {
removable.style.overflow = 'hidden';
}
}
</script>
<?
include("includes/dbconnect.php");
$Recordset = mysql_query("SELECT * FROM `dandt` WHERE `type` = 1 ORDER BY `site` AND `position` LIMIT 0 , 30") or die(mysql_error());
while( $row = $db->sql_fetchrow($Recordset) )
{
$results[] = $row;
}
echo "<br><hr><br><div onclick=\"expand('box')\" id=\"box\">";
for ($i=0;$i<7;$i++) {
echo "<a href=\"" . $results[$i]['link'] . "\">" . $results[$i]['name'] . "</a><br>";
}
echo "</div>";
?>
|