beginner: div problem in Firefox

N

nescio

hello,

using: php/css/html;
works fine in: ie
problem in : firefox;

i have a page with five links.
when a link is clicked the page reloads.
when it reloads it gets different content from a database, and
it uses a different stylesheet.

when a link is clicked, a variable is sent with the querystring.
so it is known which content to get, and which stylesheet to load.

something like <a href = 'mypage.php?naam=tab1'>



when the page reloads it knows that we need a stylesheet with the name
'tab1'.
so, we have five stylesheets named: tab1, tab2, tab3, tab4 and tab5.
i have checked the stylesheets at http://jigsaw.w3.org/css-validator/ and
the sheets where correct.

the only difference in the stylesheets are the colors and that a link is
active, the rest is always the same (heigt, width, layers e.d.).

so when people click the link, the page reloads and it will use a stylesheet
named 'tab4.css'.

the links that should be active are active, no problem there.

---------- code that workt correct -----------------
if($_GET['naam'] == 'tab4'){
echo "<img src='tab4.gif' border = 0>";
}else{
echo "<a href='" . $_SERVER['PHP_SELF'] . "?naam=tab4'><img
src='tab4.gif' border = 0></a>";
}
-----------------------------------------------------

but i want to place the links in an layer.
now the problem begins: placed in a layer, the links don't work anymore.

------------ code that doesn't work --------------
echo "<div id='tab4'>";
if($_GET['naam'] == 'tab4'){
echo "<img src='tab4.gif' border = 0>";
}else{
echo "<a href='" . $_SERVER['PHP_SELF'] . "?naam=tab4'><img
src='tab4.gif' border = 0></a>";
}
echo "</div>";
-----------------------------------------


how is this possible?

thanks,




---------------- example of a stylesheet ---------------------
#tab1{
position: absolute;
top: 20px;
left: 15px;
height: 19px;
width: 113px;
z-index: 10;
}

#tab2{
position: absolute;
top: 20px;
left: 143px;
height: 19px;
width: 113px;
z-index: 20;
}

#tab3{
position: absolute;
top: 20px;
left: 271px;
height: 19px;
width: 154px;
z-index: 30;
}

#tab4{
position: absolute;
top: 20px;
left: 440px;
height: 19px;
width: 162px;
z-index: 40;
}

#tab5{
position: absolute;
top: 20px;
left: 0px;
height: 19px;
width: 98%;
text-align: right;
z-index: 50;
}

#groeneBalk{
position: absolute;
height: 25px;
width: 100%;
left: 0px;
top: 39px;
background-color:#017DD1;
z-index: 60;
}
-----------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top