css help

Discussion in 'CSS' started by red_fiesta, Nov 2, 2006.

  1. #1
    without using floats or tables how can i get this to stay on the same line..

    <a href="#" onclick="return display_select('tour');">Tour</a>

    <span id="tour" style="display: none;">
    <select><option>Tour</option></select>
    </span>

    currently when u click the word tour it brings up a select box, but on the line below, i need it on the same line..

    see here...

    http://forums.digitalpoint.com/showthread.php?t=171094
     
    red_fiesta, Nov 2, 2006 IP
  2. Garve

    Garve Peon

    Messages:
    62
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi red_fiesta - not stalking you, honest.

    The problem is that your javascript is setting the display to block. It should be

    <script type="text/javascript">
    <!--
    function display_select(id)
    {
    var objects = new Array('env', 'lei', 'tour');

    for (var i in objects)
    {
    var element = document.getElementById(objects);

    element.style.display = element.id == id ? 'inline' : 'none';
    }

    return false;
    }
    //-->
    </script>
     
    Garve, Nov 2, 2006 IP
  3. red_fiesta

    red_fiesta Peon

    Messages:
    125
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3



    If u provide me with the answers you can stalk me as much as you want

    hehe:D
     
    red_fiesta, Nov 2, 2006 IP