Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

External and internal CSS styles at the same time?

I working with images at this moment, in my html document. A don’t want, that adjust image width for each img element, so I made separated class (for e. thumbnail) for img tag in my style.css, but that doesn’t works. Then I’d created style in my head tag, and placed the thumbnail class in there. That works, but now my style.css doesn’t works at all. What I should do?

EDIT:
Working example:
index.html:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <title>Document</title>
</head>
<body>
    <div class="container">
        <div class="header">
            <div class="logo">
                <a href="@">
                    <img src="plug.png" class="thumbnail">
                </a>
            </div>
        </div>
    </div>
</body>
</html>

style.css:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

body{
    margin: 0px;
    font-family: Arial, Helvetica, sans-serif;
}
.thumbnail{
    width: 30px;
    height: auto;
}

>Solution :

link should have a href instead of src

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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading