How do I get the results of this to be on the same line? I would like it to say From Atlanta + away New York on the same line. It is currently putting the second selection on the next line. Sorry for the dumb question. I'm new to this.

<html>
<body>

<select name='teamfrom' onChange='showSelectedfrom(this.value)'>
    <option value='Atlanta'>Atlanta</option>
    <option value='New York'>New York</option>
</select>

<select name='teamto' onChange='showSelectedto(this.value)'>
    <option value='Atlanta'>Atlanta</option>
    <option value='New York'>New York</option>
</select>

<div id='teamfrom'></div><div id='teamto'></div>


<script type="text/javascript">
    function showSelectedfrom(val){
        document.getElementById
('teamfrom').innerHTML = "From " 
+ val;
    }
    function showSelectedto(val){
        document.getElementById
('teamto').innerHTML = " + away " 
+ val;
    }

</script>
</body>
</html>

have you tried floating the divs, or just put them in a table

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.