HTML5 – die besten Beiträge

HTML style="" nur erster a href funktioniert?

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Autotuning</title>
<link rel="shortcut icon" href="T4Nissan 240 SX BR101.png" type="image/x-icon">
<meta name="description" content="">
<link href="styleSeite1.css" rel="stylesheet">
</head>
<body>
<br><br><br><br><br><br><br><center>
<a href="NFSU.html"><img src="images/NFSU.jpg" width="" height="230" style="align:/></a>
<a href="NFSU2.html"><img src="images/NFSU2.JPG" width="" height="235" style="align:/></a>
<a href="NFSUC.html"><img src="images/NFSUC.JPG" width="" height="241" style="align:/></a>
<a href="NFSC.html"><img src="images/NFSC.JPG" width="" height="237" style="align:/></a>
<a href="NFSMW2005.html"><img src="images/NFSMW2005.JPG" width="" height="230" /></a><br>
<a href="MC3DER.html"><img src="images/MC3DER.JPG" width="" height="250" style="vertical-align:/></a>
<a href="MCLACE.html"><img src="images/MCLACE.JPG" width="" height="250"/></a>
<a href="Gran Turismo 6.html"><img src="images/Gran Turismo 6.jpg" width="" height="250" /></a>
<a href="LEGO.html"><img src="images/LEGO.JPG" width="" height="250" /></a><br>
<a href="Modellbau.html"><img src="images/Modellbau.jpg" width="500" height="" align="top"/></a>
<a href="Sonstige.html"><img src="images/Sonstige.JPG" width="230" height="" align="top"/></a>
<a href="GTA5.html"><img src="images/Coil Cyclone.jpg" width="350" height="" align="top"/></a>
<a href="Silent Hill.html"><img src="images/Halo.JPG" width="185" height="" align="top"/></a>
</body>
</html>

durch ,,style=""´´ werden die Hyperlinks ohne Abstand platziert. Warum werden diese Hyperlinks gruppiert und alle außer dem erstem werden ignoriert? Die Frage ist leicht zu verstehen beim Blick auf den F12-Debugger im Browser. </style> löst das Problem nicht. autotuningyv.square7.ch/Seite1.html. Kann jemand den Quelltext bitte korrigieren?

Computer, HTML, IT, CSS, HTML5, Programmiersprache, Webdesign

Html Sticky header funktioniert nicht?

Hallo, seit Weile arbeite ich an einer Website, für welche ich jetzt einen Header installiere. Oben ist etwas Content und danach ist eben der Header, der beim Scrollen oben am Rand bleiben soll. Das ist mein Code dazu, ich hoffe jemand kann mir helfen und danke im Vorraus.

------HTML------

<div id="header">
    <img src="bilder/Logo.png" alt="Logo Fliesen"></img>
         <div id="flexbox">
             <nav>
                 <ul class="menu">
                     <div class="flexitem" id="navFlex">
                        <li><a href="index.html">Home</a></li>
                        <li><a href="engagement.html">Unser Engagement</a></li>
                        <li><a href="contact.html">Kontakt</a></li>
                        <li><a href="about.html">Über mich</a></li>
                        <li><a href="referenzen.html">Referenzen</a></li>
                    </div>
                </ul>
            </nav>
       </div>
   <div class="social" class="flexitem"></div>
</div>

-----CSS------

#header {
    height: 80px;
    left: 0;
    right: 0;
    width: 100vw;
    border-bottom: 1px solid #DEDCD9;
    background-color: white;
    display: flex;
    overflow: hidden;
    position: sticky;
}

.sticky {
    position: fixed;
    top: 0;
    width: 100%;
}
  
  .sticky + #bsp {
    padding-top: 60px;
}

------Script-------

<script>window.onscroll = function() {stickyH()};

var navbar = document.getElementById("header");
var sticky = navbar.offsetTop;
function stickyH() {
   if (window.pageYOffset >= sticky) {
       navbar.classList.add("sticky")
        } else {
                navbar.classList.remove("sticky");
              }
            } 
</script>
HTML, Webseite, CSS, HTML5, Code, Webdesign, Webentwicklung, Frontend

HTML Buttons alignment?

Moin, hier eine kleine Seite die Nur 3 Knöpfe ausgibt. Habe jetzt leider das Problem, dass die Knöpfe nicht auf gleicher höhe sind, trotz des "vertical-align:top" bin noch sehr neu in html, hoffe ihr könnt helfen. LG

Nachtrag: Habe es mit Padding gelöst, vielleicht geht es trotzdem besser anders?

<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <body>
        <style>
          .subscribe-button
          {
            background-color: rgb(204, 0, 0);
            color:white;
            border:none;
            border-radius:2px;
            cursor:pointer;
            margin-right:12px;
            transition:opacity 0.2s;
            padding-top:10px;
            padding-bottom:10px;
            padding-left:16px;
            padding-right:16px;
            vertical-align:top;
          }
          .subscribe-button:hover
          {
            opacity: 0.7;
          }
          .subscribe-button:active
          {
            opacity: 0.4;
          }
          .join-button:hover
          {
            background-color:
            rgb(37, 25, 207);
            color: white;
          }
          .join-button:active
          {
            opacity:0.7;
          }
          .join-button
          {
            background-color:white;
            color:rgb(37, 25, 207);
            border-color:rgb(37, 25, 207);
            border-style:solid;
            border-width:1px;
            border-radius:2px;
            cursor:pointer;
            margin-right:8px;
            transition:background-color 0.2s, color 0.2s, opacity 0.2s;
            padding-left:5px;
            padding-right:5px;
            padding-top:4px;
            padding-bottom:4px;
            vertical-align:top;
          }
          .tweet-button
          {
            color:white;
            background-color:rgb(67, 145, 235);
            height:36px;
            width:75px;
            border:none;
            border-radius:20px;
            font-weight:bold;
            font-size:15px;
            cursor:pointer;
            transition:box-shadow 0.15s;
            transition:opacity 0.2s;
            vertical-align:top;
          }
          .tweet-button:hover
          {
            box-shadow: 0px 5px 5px rgba(0,0,0,0.15);
          }
          .tweet-button:active
          {
            opacity:0.6;
          }
        </style>
        <button class="subscribe-button">
          SUBSCRIBE
        </button>
        <button class="join-button">
          JOIN my channel
        </button>
        <button class="tweet-button">
          Tweet
        </button>
        <btton
      </body>
  </head>
</html>
HTML, programmieren, HTML5

Meistgelesene Beiträge zum Thema HTML5