0
I’m learning HTML alone (doing research and free courses on the internet), I came across the following problem:
I have a background image that was correctly applied, but I am not able to add another image correctly, it is cropped (I put a picture of how it looked), which will be below the text and will scroll along with the Scroll page, and stay on top of the background.
Obs.: My style is being edited into another file called estilo.css
, and not directly on HTML.
Obs.: I’m quite a beginner in html and css.
Just follow my code CSS:
@charset "utf-8";
body {
background-image: url("../_imagens/fundo1.jpg");
background-repeat: no-repeat;
background-position: center center;
background-attachment: fixed;
color: rgba(250, 250, 250, 0.8);
}
h1 {
text-align: center;
}
div.logo {
background-image: url("../_imagens/logoktg.png");
background-repeat: no-repeat;
background-position: center center;
background-attachment: scroll;
}
Follow the html code:
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<title>Ka-Tet Gaming</title>
<link rel="stylesheet" href="_css/estilo.css"/>
</head>
<body>
<div id="header">
<div class="logo" id="logo">
<header id="cabecalho">
<hgroup id="titulo">
<h1>Seja Bem Vindo ao Site da KTG!</h1>
<h2>Time Range 1 da PlayerLink.</h2>
</hgroup>
</header>
</div>
</div>
</body>
</html>
The image you want to put is that of the logo ?
– NoobSaibot
Yes, it is. I updated the post and the codes, because I could put the image, but I could not adjust it.
– Robson Saldanha