Search code examples
phpcssinternet-explorerbrowsermozilla

IE not displaying content of table UL


The UL area is left blank in IE and it displays content fine in Chrome, Firefox and safari.

//on view source in IE am able to see the following code but the ul area is empty in browser:

<!DOCTYPE html>
<html>
<head>

</head>
<body>

    <div id="container">
        <div id="header">

            <div id="table">
                <center>
                    <ul>                           
                            <li onmouseover="ChangeColor(this, true);" onmouseout="ChangeColor(this, false);" onclick = "descriptionPage('Drinks','Frappuccino');"><p  class="Quor_Widget_item_nameIndex">Frappuccino </p> 
                                <p class="item_priceIndex">$2.50</p></li>


                            <li onmouseover="ChangeColor(this, true);" onmouseout="ChangeColor(this, false);" onclick = "descriptionPage('Drinks','Latte');"><p  class="Quor_Widget_item_nameIndex">Latte </p>
                                <p class="tem_priceIndex">$2.50</p></li>


                    </ul>

                </center>



            </div>

            </body>
            </html>

Solution

  • <ul>
    
                                <li onmouseover="ChangeColor(this, true);" onmouseout="ChangeColor(this, false);" onclick = "descriptionPage('Drinks','Coffee');"><p  class="Quor_Widget_item_nameIndex">Coffee  
                                    <p class="Quor_Widget_item_priceIndex">$2.50</p></li>
    

    You're opening two <p> tags but only closing one in every <li></li> pair. Chrome and firefox are smart and they fix this, IE is dumb. Damn is dumb.

    P.S. You should format your code.

    Edit: there is also a missing </div>, you see? Please check that you are closing all your tags.