0
I can’t really explain what’s going on with my code, because I’m a beginner in programming. But here’s the thing: I imported href into my css file; into html:
<html>
<head>
<title> RPG in Browser </title>
<link href="Componentes/CSS/O Começo.css" rel="stylesheet">
</head>
and another href import to an image I want you to click and direct to another page:
<tr>
<td> <a href="Componentes/HTML/Arqueiro/Página 01/HTML/Página 01.html">
<img src="Componentes/Imagens/O Começo/Arqueiro.jpg" id="ImagemClasse"> </a> </td>
except that the page and the page does not matter the css file and everything is blank. But when I take the second href the page goes back to normal, with the normal css setting, but without the image forwarding to the page I want. I wonder if I can do two href imports or if I can do only one in the whole code and how I solve that problem.
HTML code:
<html>
<head>
<title> RPG in Browser </title>
<link href="Componentes/CSS/O Começo.css" rel="stylesheet">
</head>
<body>
<div id="TabelaCentral">
<table id="Tabela">
<tr>
<td id="Classe"> <b id="Font35"> Arqueiro </b> </td>
<td id="Classe"> <b id="Font35"> Guerreiro </b> </td>
<td id="Classe"> <b id="Font35"> Mago </b> </td>
</tr>
<tr>
<td> <a href="Componentes/HTML/Arqueiro/Página 01/HTML/Página 01.html">
<img src="Componentes/Imagens/O Começo/Arqueiro.jpg" id="ImagemClasse"> </a> </td>
<td> <a href="Página 03.html">
<img src="Componentes/Imagens/O Começo/Guerreiro.jpg" id="ImagemClasse"> </a> </td>
<td> <a href="Página 04.html">
<img src="Componentes/Imagens/O Começo/Mago.jpg" id="ImagemClasse"> </a> </td>
</tr>
</table>
</div>
</body>
</html>
CSS code:
body {
background-image: url("../Imagens/O Começo/Background - Main.jpg");
background-repeat: no-repeat; background-size: 100%;
}
#TabelaCentral {
margin-top:125; align: center;
}
#Tabela {
width: 350; height: 250; margin: auto;
}
#Classe {
height: 75; width: 200; text-align: center; background-color: white;
}
#Font35 {
font-size: 35;
}
#ImagemClasse {
height: 300; width: 200; align: center;
}
Sorry for code formatting errors, I’m still learning to use the platform.
Perry, enter the full code, please, because there should be no error, maybe some other item is generating this problem.
– Daniel Mendes
ready, put on
– Perry O Ornitorrinco
to add information to you, there is an important conceptual error in this code, you used equal ID in several objects, when id must be unique, change for example id="Class" for class="Class" and in css change #Class for . Class
– Rodolfo Patane