mcan
mcan

Reputation: 2082

Confusion at orderliness while using unordered list

I think my question is the simplest question on this site. Nevertheless i couldn't solve it.

Now, i have a html like bottom. Elements have to be shown side by side. However output is like in picture below. Also, I did not get where the underscore come up from.
confused order
How can i do what i want?

        <div class="ilgiliclass">
    <?php
                echo '<ul>';
                if(...)
                {
                    foreach(...)
                    {
                        if(...)
                        {
     ?>

                                <li>
                                    <img src="img/arrow.gif">
                                    <div class="si">
                                        <a href="...">...</a> 
                                    </div>                                                             
                                    -
                                    <div class="so">
                                        <a href="...">...</a>
                                    </div>
                                    <br />
                                </li>

    <?php        
                        }
                    }  
                }  
    ?>
            </ul> 

Upvotes: 0

Views: 54

Answers (1)

Matthew Darnell
Matthew Darnell

Reputation: 4588

You have a dash in your markup between the si and so elements. I imagine that's the 'underscore' you are talking about. Both .si and .so could be set to display:inline;, which should put everything on one line.

JS Fiddle Example: http://jsfiddle.net/TYsN6/

Upvotes: 1

Related Questions