Problèmes d'executions
Swann_68
-
mirrador -
mirrador -
Bonjour à tous,
je suis en train de créer un site web et j'ai un petit problème : je n'arrive pas à décaler les liens. Quelquin peut m'aider ?
Voici le code source :
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<title>Mon titre</title>
</head>
<nav>
<ul>
<li><a href="index.html"><img src="https://www.gif-maniac.com/gifs/54/53580.gif" alt="accueil" class="img1"></a></li>
<li><a href="1er.html" class="lien1"> 1<sup>er</sup> lien</a></li>
<li><a href="2eme.html" class="lien2"> 2<sup>eme</sup> lien</a></li>
</ul>
</nav>
</body>
</html>
et le CSS :
html {
background-color: #424558;
font-family: Century Gothic, Verdana;
}
nav ul li a .img1 {
height: 6%;
width: 6%;
}
ul li a:hover {
color: #424558;
text-decoration: underline overline #424558;
top: 3px;
}
li {
list-style-type: none;
display: inline;
font-size: 1em;
}
nav {
background-color: #d3d6de;
padding:0px;
margin: 0px;
position: relative;
display: block;
width: 100%;
}
nav ul li a {
font-size: 2em;
position: relative;
text-decoration: none;
color: black;
top: -1px;
}
.lien1 {
display: inline-block;
text-align: center;
}
.lien2 {
display: inline-block;
text-align: right;
}
nav ul li a .img1 {
left: 0px;
}
nav ul li a .lien1 {
left: 40px;
}
nav ul li a .lien2 {
left: 80px;
}
Merci d'avance.
je suis en train de créer un site web et j'ai un petit problème : je n'arrive pas à décaler les liens. Quelquin peut m'aider ?
Voici le code source :
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<title>Mon titre</title>
</head>
<nav>
<ul>
<li><a href="index.html"><img src="https://www.gif-maniac.com/gifs/54/53580.gif" alt="accueil" class="img1"></a></li>
<li><a href="1er.html" class="lien1"> 1<sup>er</sup> lien</a></li>
<li><a href="2eme.html" class="lien2"> 2<sup>eme</sup> lien</a></li>
</ul>
</nav>
</body>
</html>
et le CSS :
html {
background-color: #424558;
font-family: Century Gothic, Verdana;
}
nav ul li a .img1 {
height: 6%;
width: 6%;
}
ul li a:hover {
color: #424558;
text-decoration: underline overline #424558;
top: 3px;
}
li {
list-style-type: none;
display: inline;
font-size: 1em;
}
nav {
background-color: #d3d6de;
padding:0px;
margin: 0px;
position: relative;
display: block;
width: 100%;
}
nav ul li a {
font-size: 2em;
position: relative;
text-decoration: none;
color: black;
top: -1px;
}
.lien1 {
display: inline-block;
text-align: center;
}
.lien2 {
display: inline-block;
text-align: right;
}
nav ul li a .img1 {
left: 0px;
}
nav ul li a .lien1 {
left: 40px;
}
nav ul li a .lien2 {
left: 80px;
}
Merci d'avance.