jeudi 22 novembre 2018

How can I use CSS classes when using more than one stylesheet in a HTML document?

So I am currently making a website and I have two CSS stylesheets linked to the document - one contains the styling for the main content, while the other contains styling for the header on the page.

So it looks like this:

<link rel="stylesheet" type="text/css" href="css/index.css>
<link rel="stylesheet" type="text/css" href="css/head.css>

Further down the page, I have an image element that I want to style. How do I reference a class that is contained in a specific style sheet?

Currently I have this:

<img class="logo" src="images/logo.png">

The .logo class is contained in the head.css file - however, the style isn't being applied to the element. How can I fix this?




Aucun commentaire:

Enregistrer un commentaire