Hallo Matthias,
Weil du angegeben hast, dass das Element 100% breit sein soll. Und bei
box-content: content-box
(oder ohne eine Angabe zubox-content
) ist das die Breite des Inhalts.
Ah, wegen den 100%. Ok, das habe ich nicht gewusst, weil dachte bisher Elemente wie H1, Div, usw sind automatisch 100%, sieht ja so aus wenn man Border drum legt.
sogar bei so extremen padding taucht das Problem nicht auf:
<!DOCTYPE html>
<html>
<head>
<style>
*{margin:0;}
h1{
padding:300px;
border:3px solid red;
}
</style>
</head>
<body>
<h1>testabstand</h1>
</body>
</html>
erst wenn ich dem 100% gebe. Danke.
Gruss
Henry
--
Meine Meinung zu DSGVO & Co:
„Principiis obsta. Sero medicina parata, cum mala per longas convaluere moras.“
Meine Meinung zu DSGVO & Co:
„Principiis obsta. Sero medicina parata, cum mala per longas convaluere moras.“