CSS help

Out of context: Reply #5

  • Started
  • Last post
  • 8 Responses
  • kpl0

    flip answer: use flash.

    more helpful answer:

    I won't tell everything, but here's some code, some instructions, and you can figure the rest out. I'll assume you know basic JS and CSS.

    These lines will hide a span or a div using JS and DOM:

    var obj;
    obj = document.getElementById('xxx');
    obj.style.visibility = "hidden";

    replace xxx with the id of the element you're targetting.

    next, set two span tags next to each other. set one as over, the other as out. out would contain "contact", over contains "the office." set the over span's visibility to hidden in css. make the text in each span links. for the out one, don't put in a href (or set it to "#" or something) but make it hide itself and show the other div on mouse over. for the a tag on the other span, set mouseout to hide over and show the out span. and set the href to a proper page.

    see if that works. if not, well, experiment around with this set up. good luck.

View thread