Bonjour a tous.
Je début un peu en Css et j'ai fait un petit bout de page pour m'entrainer.Donc tout marche (pour le moment) mais je me demande si je me suis pas compliqué la vie pour certaines chose ou si je n'ai pas tout faux sur certain chose.
donc le résultat donne cela :
Voici le code Html:
Code :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
| <html>
<head>
<!doctype html>
<meta charset="utf-8">
<link rel="stylesheet" href="Prj.css">
<title>Prj20Dec</title>
</head>
<body>
<div id="bloc_page">
<section id="Joueur1" class="joueur">
<h1 id="NomJoueur1">Joueur 1</h1>
<div class="ListePieceJouable">
<ul>
<li>Image1</li>
<li>Image2</li>
<li>Image3</li>
<li>Image4</li>
</ul>
</div>
</section>
<section id="Joueur2" class="joueur">
<h1 id="NomJoueur2">Joueur 2</h1>
<div class="ListePieceJouable">
<ul>
<li>Image1</li>
<li>Image2</li>
<li>Image3</li>
<li>Image4</li>
</ul>
</div>
</section>
<section id="Score">
<h1>Score</h1>
<div id="scoreJoueur1">
<p>0</p>
</div>
<div id="scoreJoueur2">
<p>0</p>
</div>
</section>
<nav id="navBasPage">
<ul>
<li>Nouvelle Partie</li>
<li>quitter</li>
<li>remettre les scores a 0</i>
</ul>
</nav>
</div>
</body>
</html> |
et voila le code css :
Code :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
| /*---------------------------section joueur-----------------------*/
.joueur{
width:15% ;
height:99.3%;
border:solid;
}
.ListePieceJouable{
display:inline;
}
#Joueur1{
position:absolute;
left:0px;
top:0px;
}
#joueur2{
position:absolute;
right:0px;
top:0px;
}
section[id*="Joueur"] ul{
border:solid;
width:50%;
margin:auto;
}
.joueur h1{
text-align:center;
}
/*-----------------------fin section joueur-----------------------*/
/*-----------------------section score----------------------*/
#score{
position:absolute;
left:30%;
top:0px;
width:40% ;
height:100px;
border:solid;
border-radius:10px;
}
#score h1{
position:relative;
border:solid;
border-top:0px;
width:150px;
margin:auto;
text-align:center;
z-index:2;
background-color:red;
}
#score p{
text-align:center;
font-size:16px;
width:50%;
height:100%;
text-align:center;
font-size:4em;
}
#scoreJoueur1 p{
position:relative;
left:0px;
bottom:95px;
border-right:solid 2px;
text-align:center;
z-index:1;
}
#scoreJoueur2 p{
position:relative;
left:50%;
bottom:259px;
z-index:1;
}
/*-----------------------fin section score----------------------*/
/*------------------------------Nav----------------------------*/
#navBasPage{
position:absolute;
bottom:0px;
left:15.3%;
width:69.4%;
height:80px;
border-top:solid;
border-bottom:solid;
margin:0px;
}
#navBaspage ul{
width:90%;
height:40px;
margin:auto;
margin-top:20px;
list-style-type: none;
}
#navBaspage li{
border:solid;
display:inline-block;
width:200px;
height:25px;
margin-top:3.75px;
margin-right:50px;
margin-left:60px;
background: url('img/fond_degraderouge.png') repeat-x;
border: 1px solid #760001;
border-radius: 5px;
font-size: 1.2em;
text-align: center;
padding: 3px 8px 0px 8px;
color: white;
text-decoration: none;
} |
Donc si vous voyez de grosse erreur de super bêtises ou même de petit chose hésité pas a me le faire remarquer.
Merci d'avance.