try to fix header on webkit browsers

This commit is contained in:
filifa 2024-03-25 22:44:54 -05:00
parent afdb07bec3
commit ab28aadbf4
4 changed files with 20 additions and 15 deletions

View File

@ -5,18 +5,20 @@ class DDHeader extends HTMLElement {
connectedCallback() { connectedCallback() {
this.innerHTML = ` this.innerHTML = `
<img id="headerimg" src="/dairydemon.jpg" alt="cow with glowing eyes" /> <header>
<div id="headermain"> <img id="headerimg" src="/dairydemon.jpg" alt="cow with glowing eyes" />
<p><a id="homelink" href="/">dairydemon.net</a></p> <div id="headermain">
<nav> <p><a id="homelink" href="/">dairydemon.net</a></p>
<ul> <nav>
<li><a href="https://social.dairydemon.net">mastodon</a></li> <ul>
<li><a href="https://scm.dairydemon.net">git</a></li> <li><a href="https://social.dairydemon.net">mastodon</a></li>
</ul> <li><a href="https://scm.dairydemon.net">git</a></li>
</nav> </ul>
</div> </nav>
</div>
</header>
`; `;
} }
} }
customElements.define("dd-header", DDHeader, { extends: "header" }); customElements.define("dd-header", DDHeader);

View File

@ -9,7 +9,7 @@
</head> </head>
<body> <body>
<header is="dd-header"></header> <dd-header></dd-header>
<main> <main>
<article> <article>
<h1>Hi.</h1> <h1>Hi.</h1>

View File

@ -9,7 +9,7 @@
</head> </head>
<body> <body>
<header is="dd-header"></header> <dd-header></dd-header>
<main> <main>
<aside> <aside>
<ol> <ol>

View File

@ -11,12 +11,15 @@ body {
align-items: center; align-items: center;
} }
header { dd-header {
margin: 5px; margin: 5px;
width: 80ch; width: 80ch;
max-width: 100%; max-width: 100%;
height: 110px;
box-shadow: 5px 5px 5px; box-shadow: 5px 5px 5px;
}
header {
height: 110px;
flex: auto; flex: auto;
display: flex; display: flex;
align-items: center; align-items: center;