beginner: div problem in Firefox

Discussion in 'HTML' started by nescio, Jul 25, 2006.

  1. nescio

    nescio Guest

    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;
    }
    -----------------------------------------------
     
    nescio, Jul 25, 2006
    #1
    1. Advertising

  2. nescio

    Dylan Parry Guest

    nescio wrote:

    > i have a page with five links.


    A URL would be handy. I can't even begin to guess at a solution without
    actually having seen the problem.

    --
    Dylan Parry - http://electricfreedom.org

    A Flower?
     
    Dylan Parry, Jul 25, 2006
    #2
    1. Advertising

  3. nescio

    nescio Guest

    nescio, Jul 25, 2006
    #3
  4. nescio

    Els Guest

    Els, Jul 25, 2006
    #4
  5. nescio

    nescio Guest


    > The width on tab 5 is overlapping the other ones.
    >
    > --
    > Els http://locusmeus.com/



    you where right.
    i changed the z-index and now it works fine.

    thanks
     
    nescio, Jul 25, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=

    No Class at ALL!!! beginner/beginner question

    =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=, Feb 2, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    590
    =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=
    Feb 3, 2005
  2. Rensjuh
    Replies:
    7
    Views:
    976
    Mabden
    Sep 2, 2004
  3. K Viltersten

    <div ... /> and <div ...></div>

    K Viltersten, Mar 30, 2009, in forum: ASP .Net
    Replies:
    4
    Views:
    751
  4. Dwayne Madsen

    Q: Div A inside Div B is larger than Div B

    Dwayne Madsen, Jun 1, 2005, in forum: Javascript
    Replies:
    1
    Views:
    191
    David Dorward
    Jun 1, 2005
  5. mscir
    Replies:
    3
    Views:
    315
    Martin Honnen
    Jun 26, 2005
Loading...

Share This Page