mercredi 22 juin 2016

I'm having issues with assigning IDs properly in CSS

So, I'm having this issue with trying to make code apply to items within a sublist, which I have named "Horizontal"

<nav class="horizontal" id="horizontal">
            <ul>
               <li><a href="#">Home</a></li>
               <li><a href="#">Menu</a></li>
               <li><a href="#">Locations</a></li>
               <li><a href="#">Catering</a></li>
               <li><a href="#">About Us</a></li>
            </ul>

This should in turn translate over to my CSS file as so

#horizontal > li {
    background-color: white;
    font-size: 16px;
    height: 50px;
    line-height: 50px;
    width: 180px;
    display: inline-block;
    horizontal-align: left;

I know the file is linked to my HTML doc as it has worked with other style rules.. I'd like to know why. Any help would be appreciated.

Also, side note: for this snippet

display: inline-block;
horizontal-align: left;
}

The effect I'm trying to go for here is to display the item as a block and float it to the left, I'd like to know if I'm on the right track with that code.

Aucun commentaire:

Enregistrer un commentaire