Problem with HREF import

Asked

Viewed 73 times

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.

  • ready, put on

  • 1

    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

2 answers

3


change <link href="Componentes/CSS/O Começo.css" rel="stylesheet"> for <link href="Componentes/CSS/ocomeco.css" rel="stylesheet">, change the file name to ocomeco.css, also change any link that you have placed a space between words, if it is necessary to put "the beginning" put this way o-comeco.css, preferably without the ç, in a page utf-8 it is recognized, more can give some failure in the request in some servers, although in a normal page of a post, you could use it without major problems, since it is registered this way.

see if it works and give me a feedback, if it worked out, mark as solved : )

1

To fix this problem, try adding the HTML page to the tag:

<head>
<meta charset="utf-8">
</head>

So you can use the characters available in our language. If the error persists, try changing the name of your CSS page.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.