Obeying only part of a style

Discussion in 'HTML' started by sheldonlg, Feb 28, 2008.

  1. sheldonlg

    sheldonlg Guest

    I have a small test html program (www.sheldonlg.com/toggling4.htm) that
    works fine. Clicking "Show" causes a block to appear at 200,200. The
    Javascript handles this and causes the Show to change to hide.

    My problem is that when I put this into my actual application,
    everything works fine (including toggling and color changes, etc.)
    except that the positioning is ignored. It appears in the position
    where it was defined in the page (after another block) and causes the
    rest of the page to be pushed down by that amount.

    The css class is:
    ..showHide {
    zIndex: 99;
    transparency: 80%;
    position: absolute;
    top: 200px;
    left: 200px;
    background-color: #DDDDDD;
    visibility:hidden;
    }

    What could cause just the positioning to be ignored?
    sheldonlg, Feb 28, 2008
    #1
    1. Advertising

  2. sheldonlg

    Els Guest

    sheldonlg wrote:

    > I have a small test html program (www.sheldonlg.com/toggling4.htm) that
    > works fine. Clicking "Show" causes a block to appear at 200,200. The
    > Javascript handles this and causes the Show to change to hide.
    >
    > My problem is that when I put this into my actual application,
    > everything works fine (including toggling and color changes, etc.)
    > except that the positioning is ignored. It appears in the position
    > where it was defined in the page (after another block) and causes the
    > rest of the page to be pushed down by that amount.


    > zIndex: 99;


    zIndex should be z-index.

    > What could cause just the positioning to be ignored?


    Difficult to say if we can't see the page where this is happening.


    --
    Els http://locusmeus.com/
    Els, Feb 28, 2008
    #2
    1. Advertising

  3. sheldonlg

    sheldonlg Guest

    Els wrote:
    > sheldonlg wrote:
    >
    >> I have a small test html program (www.sheldonlg.com/toggling4.htm) that
    >> works fine. Clicking "Show" causes a block to appear at 200,200. The
    >> Javascript handles this and causes the Show to change to hide.
    >>
    >> My problem is that when I put this into my actual application,
    >> everything works fine (including toggling and color changes, etc.)
    >> except that the positioning is ignored. It appears in the position
    >> where it was defined in the page (after another block) and causes the
    >> rest of the page to be pushed down by that amount.

    >
    >> zIndex: 99;

    >
    > zIndex should be z-index.
    >
    >> What could cause just the positioning to be ignored?

    >
    > Difficult to say if we can't see the page where this is happening.
    >
    >


    Thank you. I made that change (I should have noticed it myself) and
    also noticed that in the actual app I had 200 and not 200px. Making
    both these changes got it to work.
    sheldonlg, Feb 28, 2008
    #3
  4. sheldonlg

    Bergamot Guest

    sheldonlg wrote:
    > Els wrote:
    >>
    >> zIndex should be z-index.

    >
    > also noticed that in the actual app I had 200 and not 200px. Making
    > both these changes got it to work.


    FYI if you validate your code, you'll find errors like that yourself,
    and a lot quicker.
    http://validator.w3.org/
    http://jigsaw.w3.org/css-validator/

    --
    Berg
    Bergamot, Feb 28, 2008
    #4
    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. Toralf
    Replies:
    2
    Views:
    2,486
    Ken Dopierala Jr.
    Oct 4, 2004
  2. Richard Bondi

    XPathAPI not obeying XPath properly

    Richard Bondi, Aug 25, 2004, in forum: Java
    Replies:
    2
    Views:
    641
    Richard Bondi
    Aug 27, 2004
  3. Ken Varn
    Replies:
    0
    Views:
    428
    Ken Varn
    Apr 26, 2004
  4. Jack
    Replies:
    8
    Views:
    263
  5. Mia
    Replies:
    4
    Views:
    116
    Dr.Ruud
    Sep 12, 2006
Loading...

Share This Page