I have an HTML file (called index.html
, which contains an <iframe>
element that displays another HTML file (called home.html
). I’m trying to style the fonts on both pages with a file (/styling/style.css
). Here is the content of the files:
index.html
:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="module" src="https://unpkg.com/@fluentui/web-components"></script>
<p>Testing header...</p>
<style type="text/css">
body, html
{
margin: 0; padding: 0; height: 100%; overflow: hidden;
}
#content
{
position:absolute; left: 0; right: 0; bottom: 0; top: 0px;
}
</style>
<link href="/styling/style.css"/>
</head>
<body>
<iframe width="100%" height="100%" src="home.html"></iframe>
</body>
</html>
home.html
:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="module" src="https://unpkg.com/@fluentui/web-components"></script>
<link href="/styling/style.css"/>
</head>
<body>
<fluent-button>Wow!</fluent-button>
<fluent-card>
<h1>What is Formal Software?</h1>
</fluent-card>
<fluent-card>
<fluent-card>
<img src="https://formalsoftware.great-site.net/assets/texTypeLogo.png"/>
</fluent-card>
</fluent-card>
</body>
</html>
/styling/style.css
:
html {
background-color: black;
}
h1 {
font-family: 'Segoe UI';
font-size: 36px;
font-weight: bold;
color: blue;
}
But I see the wrong fonts and no black background:
What am I doing wrong here?