Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display: none; is not working.

I'm a complete beginner trying to create a horizontal drop menu. My style sheet doesn't seem to be applying to my submenu level.

Please can you spot the error in my code?

thanks

In my "_SiteLayout.cshtml" I have

           <ul id="TopMenu">
                <li><a href="@Href("~/MgtCentre")">Management</a>
                    <ul id=“SubMenu”> 
                        <li><a href="@Href("~/AboutUs")">Admin Centre</a></li>
                        <li><a href="@Href("~/AboutUs")">Reports</a></li>
                    </ul>                        
                 </li>
                <li><a href="@Href("~/FAQ")">FAQ</a></li>
            </ul>

In my "Site.css" I have

    ul#SubMenu {
        display: none;
    }
like image 721
Pinwheeler Avatar asked Feb 20 '26 22:02

Pinwheeler


1 Answers

Looks like you have magic/curly quotes in:-

ul id=“SubMenu”

Should be "SubMenu" or 'SubMenu'

like image 174
Rippo Avatar answered Feb 22 '26 11:02

Rippo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!