samedi 2 décembre 2017

CSS command not working in CSS file but working in main HTML

I am making a website using HTML 5 and I am trying to assign a certain height to a nav element. In the CSS file that I wrote, the height of the element did not change:

nav {
    top: 0px;
    right: 0px;
    left: 0px;
    position: fixed;
    width: 100% height: 5%;
    background-color: white;
}

However, when I went into the HTML file and did it again, it did:

<style>
    nav {
        height: 5%;
    }
</style>

Any way to fix this while still using the CSS file?




Aucun commentaire:

Enregistrer un commentaire