pozycjonowaanie textu na png@header

This commit is contained in:
baiobelfer 2025-09-04 12:54:12 +02:00
parent e26fa89233
commit 63060a9db8
2 changed files with 22 additions and 1 deletions

View File

@ -4,3 +4,21 @@ body {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
header {
position: relative;
text-align: center;
}
header img {
width: 100%;
}
.header-text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
font-size: 48px;
font-weight: bold;
}

View File

@ -6,10 +6,13 @@
<link rel="stylesheet" href="css/layout.css"> <link rel="stylesheet" href="css/layout.css">
</head> </head>
<body> <body>
<header> <header>
<img src="imgs/baner.png" alt="kursy komputerowe"> <img src="imgs/baner.png" alt="kursy komputerowe">
<div class="header-text">hello</div> <div class="header-text">Kursy komputerowe</div>
</header> </header>
<nav> <nav>
<a href="i1.html">Strona główna</a> <a href="i1.html">Strona główna</a>
<a href="raty.html">Koszt rat</a> <a href="raty.html">Koszt rat</a>