2

I am doing a project where I have to put some hockey players in order by statistics. I finished that part pretty easily, but then I noticed that the divs containing the names of the players and their stats weren't displaying the same way. Here's a picture: enter image description here

As you can see, the first two print out differently than the rest. I believe it is because the first two were made manually in HTML and the rest were made in a "for" loop and appended to the list. Unfortunately, I can't find any difference between the two sets of divs; they have the same class, the same elements inside and the same location, as far as I can tell.

Here is some of my code :

let listeDiv = document.getElementById("liste");

let elementStats = document.getElementById("stats-hockey");
let textStats = elementStats.innerHTML;

// sépare le texte au caractère "new line"
let ligneStats = textStats.split("\n"); // Est-ce que c'est correct si j'ai changé l'ordre un peu ?

class Joueur {
  nom = "";
  equipe = "";
  buts = 0;
  tirsAuBut = 0;

  constructor(_nom, _equipe, _buts, _tirsAuBut) {
    this.nom = _nom;
    this.equipe = _equipe;
    this.buts = _buts;
    this.tirsAuBut = _tirsAuBut;
  }
}

let tableauComplet = new Array();

for (let ligneIndex = 0; ligneIndex < ligneStats.length; ligneIndex++) {
  let tableauStatsIndividuelles = ligneStats[ligneIndex];
  tableauStatsIndividuelles = tableauStatsIndividuelles.trim();

  if (tableauStatsIndividuelles != "") {
    tableauStatsIndividuelles = tableauStatsIndividuelles.split(";");

    let nom = tableauStatsIndividuelles[0];
    let equipe = tableauStatsIndividuelles[1];
    let buts = tableauStatsIndividuelles[4];
    let tirsAuBut = tableauStatsIndividuelles[10];

    let joueur = new Joueur(nom, equipe, buts, tirsAuBut);
    tableauComplet.push(joueur);
  }
}

function afficherJoueurs() // Animation pour les pays
{
  //liste.innerText = "";

  for (let rangeeIndex = 0; rangeeIndex < 3; rangeeIndex++) {
    let joueur = tableauComplet[rangeeIndex];

    let joueurDiv = document.createElement("div");
    let nomDiv = document.createElement("div");
    let equipeDiv = document.createElement("div");
    let butsDiv = document.createElement("div");
    let tirsAuButDiv = document.createElement("div");

    joueurDiv.className = "joueur";
    nomDiv.className = "nom";
    equipeDiv.className = "equipe";
    butsDiv.className = "buts";
    tirsAuButDiv.className = "tirs-au-but";

    nomDiv.innerText = tableauComplet[rangeeIndex].nom;
    equipeDiv.innerText = tableauComplet[rangeeIndex].equipe;
    butsDiv.innerText = "buts : " + tableauComplet[rangeeIndex].buts;
    tirsAuButDiv.innerText = "tirs : " + tableauComplet[rangeeIndex].tirsAuBut;

    joueurDiv.append(nomDiv, equipeDiv, butsDiv, tirsAuButDiv);

    liste.append(joueurDiv);
  }

}

afficherJoueurs();
* {
  box-sizing: border-box;
}

#stats-hockey {
  visibility: hidden;
  height: 0px;
}

.joueur {
  position: relative;
  width: 700px;
  border-bottom: 1px solid white;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.nom {
  display: inline-block;
  background-color: lightblue;
  font-weight: bold;
  width: 280px;
}

.equipe {
  display: inline-block;
  background-color: rgb(153, 194, 192);
  width: 65px;
  text-align: center;
}

.buts {
  display: inline-block;
  background-color: lightblue;
  padding-left: 10px;
  width: 165px;
}

.tirs-au-but {
  display: inline-block;
  background-color: rgb(153, 194, 192);
  padding-left: 10px;
  width: 175px;
}
<pre id="stats-hockey">
        Connor McDavid;EDM;24;80;44;79;123;45;28;22:03;314
        Johnny Gaudreau;CGY;28;82;40;75;115;26;64;18:34;262
        Jonathan Huberdeau;FLA;28;80;30;85;115;54;35;19:25;222
        Leon Draisaitl;EDM;26;80;55;55;110;40;17;22:20;278
</pre>
<!--J.T. Miller n'est pas en ordre à cause du point-->

<div id="liste">

  <div class="joueur">
    <div class="nom">Bill Barilko</div>
    <div class="equipe">TOR</div>
    <div class="buts">buts: 8</div>
    <div class="tirs-au-but">tirs: 35</div>
  </div>
  <div class="joueur">
    <div class="nom">Alexander Mogilny</div>
    <div class="equipe">BUF</div>
    <div class="buts">buts: 76</div>
    <div class="tirs-au-but">tirs: 323</div>
  </div>

</div>

P.S. Sorry most of the code is in French. It's a school project, so I don't have much choice.

  • Is it supposed to be like the first two divs or the divs that you appended? – Emiel Zuurbier Oct 15 '22 at 14:16
  • This is not a [mcve]. We definitely don't need all fifty entries of that "table". We also don't need all that colors and columns (two would have been enough). Also the animation is not relevant for the problem -> [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask) -> [mcve] – Andreas Oct 15 '22 at 14:20
  • 1
    _"Inspect"_ the elements in the "table" and you will see where the extra "whitespace" is coming from – Andreas Oct 15 '22 at 14:21
  • 1
    Are you talking about the first two rows being different? They're different because there are white space Text nodes between them, whereas there aren't in the rows you add. – T.J. Crowder Oct 15 '22 at 14:22

3 Answers3

1

Replace this hardcoded section:

  <div class="joueur">
    <div class="nom">Bill Barilko</div>
    <div class="equipe">TOR</div>
    <div class="buts">buts: 8</div>
    <div class="tirs-au-but">tirs: 35</div>
  </div>
  <div class="joueur">
    <div class="nom">Alexander Mogilny</div>
    <div class="equipe">BUF</div>
    <div class="buts">buts: 76</div>
    <div class="tirs-au-but">tirs: 323</div>
  </div>

With this (no newlines):

        <div class="joueur">
                <div class="nom">Bill Barilko</div><div class="equipe">TOR</div><div class="buts">buts: 8</div><div class="tirs-au-but">tirs: 35</div>
        </div>
        <div class="joueur">
                <div class="nom">Alexander Mogilny</div><div class="equipe">BUF</div><div class="buts">buts: 76</div><div class="tirs-au-but">tirs: 323</div>
        </div>

The newlines add extra space to the DOM.

Alternative: Reset the size of the empty space using CSS:

.joueur
{
    position: relative;
    width: 700px;
    border-bottom: 1px solid white;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri,                  'Trebuchet MS', sans-serif;
    font-size: 0;
}
.joueur * {
  font-size: 1rem;
}

Yet another (cleaner) option is to use Flexbox. Check Emiel's answer.

For further information about this behavior make sure to read this article: How whitespace is handled by HTML, CSS, and in the DOM

Kostas Minaidis
  • 4,681
  • 3
  • 17
  • 25
1

The problem you're having is caused by whitespace nodes between the <div> elements inside of each div.joueur element. Read more about it here: How whitespace is handled by HTML, CSS, and in the DOM

If you add Flexbox to the div.joueur then CSS won't render the whitespace.

let listeDiv = document.getElementById("liste");

let elementStats = document.getElementById("stats-hockey");
let textStats = elementStats.innerHTML;

// sépare le texte au caractère "new line"
let ligneStats = textStats.split("\n"); // Est-ce que c'est correct si j'ai changé l'ordre un peu ?

class Joueur {
  nom = "";
  equipe = "";
  buts = 0;
  tirsAuBut = 0;

  constructor(_nom, _equipe, _buts, _tirsAuBut) {
    this.nom = _nom;
    this.equipe = _equipe;
    this.buts = _buts;
    this.tirsAuBut = _tirsAuBut;
  }
}

let tableauComplet = new Array();

for (let ligneIndex = 0; ligneIndex < ligneStats.length; ligneIndex++) {
  let tableauStatsIndividuelles = ligneStats[ligneIndex];
  tableauStatsIndividuelles = tableauStatsIndividuelles.trim();

  if (tableauStatsIndividuelles != "") {
    tableauStatsIndividuelles = tableauStatsIndividuelles.split(";");

    let nom = tableauStatsIndividuelles[0];
    let equipe = tableauStatsIndividuelles[1];
    let buts = tableauStatsIndividuelles[4];
    let tirsAuBut = tableauStatsIndividuelles[10];

    let joueur = new Joueur(nom, equipe, buts, tirsAuBut);
    tableauComplet.push(joueur);
  }
}

function afficherJoueurs() // Animation pour les pays
{
  //liste.innerText = "";

  for (let rangeeIndex = 0; rangeeIndex < tableauComplet.length; rangeeIndex++) {
    let joueur = tableauComplet[rangeeIndex];

    let joueurDiv = document.createElement("div");
    let nomDiv = document.createElement("div");
    let equipeDiv = document.createElement("div");
    let butsDiv = document.createElement("div");
    let tirsAuButDiv = document.createElement("div");

    joueurDiv.className = "joueur";
    nomDiv.className = "nom";
    equipeDiv.className = "equipe";
    butsDiv.className = "buts";
    tirsAuButDiv.className = "tirs-au-but";

    nomDiv.innerText = tableauComplet[rangeeIndex].nom;
    equipeDiv.innerText = tableauComplet[rangeeIndex].equipe;
    butsDiv.innerText = "buts : " + tableauComplet[rangeeIndex].buts;
    tirsAuButDiv.innerText = "tirs : " + tableauComplet[rangeeIndex].tirsAuBut;

    joueurDiv.append(nomDiv, equipeDiv, butsDiv, tirsAuButDiv);

    liste.append(joueurDiv);
  }



  // querySelectorAll(".joueur")  retourne un tableau de tous les éléments qui ont une classe de "joueur"
  let tableauDivJoueurs = document.querySelectorAll(".joueur");

  for (let joueurIndex = 0; joueurIndex < tableauDivJoueurs.length; joueurIndex++) {
    tableauDivJoueurs[joueurIndex].style.left = "-2000px";
    // anime chaque élément
    tableauDivJoueurs[joueurIndex].animate([{
      left: "-1000px",
      opacity: 0
    }, {
      left: "20px",
      opacity: 1
    }], {
      duration: 1000,
      delay: `${joueurIndex * 80}`,
      fill: "forwards"
    });
  }

}

afficherJoueurs();
* {
  box-sizing: border-box;
}

#stats-hockey {
  visibility: hidden;
  height: 0px;
}

.joueur {
  display: flex;
  position: relative;
  width: 700px;
  border-bottom: 1px solid white;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.nom {
  display: inline-block;
  background-color: lightblue;
  font-weight: bold;
  width: 280px;
}

.equipe {
  display: inline-block;
  background-color: rgb(153, 194, 192);
  width: 65px;
  text-align: center;
}

.buts {
  display: inline-block;
  background-color: lightblue;
  padding-left: 10px;
  width: 165px;
}

.tirs-au-but {
  display: inline-block;
  background-color: rgb(153, 194, 192);
  padding-left: 10px;
  width: 175px;
}
<pre id="stats-hockey">
        Connor McDavid;EDM;24;80;44;79;123;45;28;22:03;314
        Johnny Gaudreau;CGY;28;82;40;75;115;26;64;18:34;262
        Jonathan Huberdeau;FLA;28;80;30;85;115;54;35;19:25;222
        Leon Draisaitl;EDM;26;80;55;55;110;40;17;22:20;278
        Kirill Kaprizov;MIN;24;81;47;61;108;34;27;19:06;289
        Auston Matthews;TOR;24;73;60;46;106;18;20;20:36;348
        Steven Stamkos;TBL;31;81;42;64;106;36;24;18:28;241
        Matthew Tkachuk;CGY;24;82;42;62;104;68;57;17:53;253
        J.T. Miller;VAN;28;80;32;67;99;47;15;21:04;206 
        Mitchell Marner;TOR;24;72;35;62;97;16;23;20:52;224
        Roman Josi;NSH;31;80;23;73;96;46;13;25:32;281
        Artemi Panarin;NYR;30;75;22;74;96;18;21;19:12;177
        Kyle Connor;WPG;25;79;47;46;93;4;-3;21:46;317
        Mikko Rantanen;COL;25;75;36;56;92;56;35;20:58;254
        Patrick Kane;CHI;33;78;26;66;92;18;-19;21:49;287
        Alexander Ovechkin;WSH;36;77;50;40;90;18;8;20:34;334
        Aleksander Barkov;FLA;26;67;39;49;88;18;36;20:18;214
        Nathan MacKinnon;COL;26;65;32;56;88;42;22;21:03;299
        Nazem Kadri;COL;31;71;28;59;87;71;13;19:14;247
        Matt Duchene;NSH;30;78;43;43;86;38;6;19:00;228
        Cale Makar;COL;23;77;28;58;86;26;48;25:40;240
        Kevin Fiala;MIN;25;82;33;52;85;52;23;17:38;262
        Victor Hedman;TBL;31;82;20;65;85;36;26;25:04;219
        Filip Forsberg;NSH;27;69;42;42;84;22;12;18:05;226
        Jake Guentzel;PIT;27;76;40;44;84;44;13;20:05;264
        Sidney Crosby;PIT;34;69;31;53;84;32;19;19:58;208
        Elias Lindholm;CGY;27;82;42;40;82;22;61;19:56;235
        Vladimir Tarasenko;STL;30;75;34;48;82;32;7;16:54;230
        Sam Reinhart;FLA;26;78;33;49;82;13;25;17:45;186
        Sebastian Aho;CAR;24;79;37;44;81;38;18;18:57;221
        Mika Zibanejad;NYR;28;81;29;52;81;12;30;19:37;219
        Joe Pavelski;DAL;37;82;27;54;81;14;11;18:28;216
        William Nylander;TOR;25;81;34;46;80;16;-9;18:16;256
        Brad Marchand;BOS;33;70;32;48;80;97;16;19:14;242
        Jason Robertson;DAL;22;74;41;38;79;22;16;18:06;220
        Mats Zuccarello;MIN;34;70;24;55;79;24;21;18:35;159
        Alex DeBrincat;CHI;24;82;41;37;78;19;-13;20:51;270
        Evgeny Kuznetsov;WSH;29;79;24;54;78;44;7;20:16;208
        Chris Kreider;NYR;30;81;52;25;77;24;19;18:43;258
        David Pastrnak;BOS;25;72;40;37;77;20;13;18:36;312
        Robert Thomas;STL;22;72;20;57;77;16;17;18:46;115
        Timo Meier;SJS;25;77;35;41;76;54;-3;19:09;326
        Pavel Buchnevich;STL;26;73;30;46;76;34;29;18:18;199
        John Tavares;TOR;31;79;27;49;76;32;-8;18:04;237
        Jordan Kyrou;STL;23;74;27;48;75;20;10;16:34;188
        Adam Fox;NYR;23;78;11;63;74;26;18;23:54;158
        Jesper Bratt;NJD;23;76;26;47;73;16;0;17:25;197
        Roope Hintz;DAL;25;80;37;35;72;28;15;18:02;213
        John Carlson;WSH;31;78;17;54;71;20;13;23:48;195
        Mark Scheifele;WPG;28;67;29;41;70;23;-17;21:08;159
    </pre>
<!--J.T. Miller n'est pas en ordre à cause du point-->

<div id="liste">

  <div class="joueur">
    <div class="nom">Bill Barilko</div>
    <div class="equipe">TOR</div>
    <div class="buts">buts: 8</div>
    <div class="tirs-au-but">tirs: 35</div>
  </div>
  <div class="joueur">
    <div class="nom">Alexander Mogilny</div>
    <div class="equipe">BUF</div>
    <div class="buts">buts: 76</div>
    <div class="tirs-au-but">tirs: 323</div>
  </div>

</div>
Emiel Zuurbier
  • 19,095
  • 3
  • 17
  • 32
1

The quick fix is to add display: flex; to .joueur.

The reason is that there are empty spaces between the inline-blocks in the first two instances (i.e those that are fixed in the HTML code), caused by the line breaks in the HTML code. flex helps to avoid those by making all those inline-blocks flex-children (which won't have space between them).

let listeDiv = document.getElementById("liste");

let elementStats = document.getElementById("stats-hockey");
let textStats = elementStats.innerHTML;

// sépare le texte au caractère "new line"
let ligneStats = textStats.split("\n"); // Est-ce que c'est correct si j'ai changé l'ordre un peu ?

class Joueur {
  nom = "";
  equipe = "";
  buts = 0;
  tirsAuBut = 0;

  constructor(_nom, _equipe, _buts, _tirsAuBut) {
    this.nom = _nom;
    this.equipe = _equipe;
    this.buts = _buts;
    this.tirsAuBut = _tirsAuBut;
  }
}

let tableauComplet = new Array();

for (let ligneIndex = 0; ligneIndex < ligneStats.length; ligneIndex++) {
  let tableauStatsIndividuelles = ligneStats[ligneIndex];
  tableauStatsIndividuelles = tableauStatsIndividuelles.trim();

  if (tableauStatsIndividuelles != "") {
    tableauStatsIndividuelles = tableauStatsIndividuelles.split(";");

    let nom = tableauStatsIndividuelles[0];
    let equipe = tableauStatsIndividuelles[1];
    let buts = tableauStatsIndividuelles[4];
    let tirsAuBut = tableauStatsIndividuelles[10];

    let joueur = new Joueur(nom, equipe, buts, tirsAuBut);
    tableauComplet.push(joueur);
  }
}

function afficherJoueurs() // Animation pour les pays
{
  //liste.innerText = "";

  for (let rangeeIndex = 0; rangeeIndex < tableauComplet.length; rangeeIndex++) {
    let joueur = tableauComplet[rangeeIndex];

    let joueurDiv = document.createElement("div");
    let nomDiv = document.createElement("div");
    let equipeDiv = document.createElement("div");
    let butsDiv = document.createElement("div");
    let tirsAuButDiv = document.createElement("div");

    joueurDiv.className = "joueur";
    nomDiv.className = "nom";
    equipeDiv.className = "equipe";
    butsDiv.className = "buts";
    tirsAuButDiv.className = "tirs-au-but";

    nomDiv.innerText = tableauComplet[rangeeIndex].nom;
    equipeDiv.innerText = tableauComplet[rangeeIndex].equipe;
    butsDiv.innerText = "buts : " + tableauComplet[rangeeIndex].buts;
    tirsAuButDiv.innerText = "tirs : " + tableauComplet[rangeeIndex].tirsAuBut;

    joueurDiv.append(nomDiv, equipeDiv, butsDiv, tirsAuButDiv);

    liste.append(joueurDiv);
  }



  // querySelectorAll(".joueur")  retourne un tableau de tous les éléments qui ont une classe de "joueur"
  let tableauDivJoueurs = document.querySelectorAll(".joueur");

  for (let joueurIndex = 0; joueurIndex < tableauDivJoueurs.length; joueurIndex++) {
    tableauDivJoueurs[joueurIndex].style.left = "-2000px";
    // anime chaque élément
    tableauDivJoueurs[joueurIndex].animate([{
      left: "-1000px",
      opacity: 0
    }, {
      left: "20px",
      opacity: 1
    }], {
      duration: 1000,
      delay: `${joueurIndex * 80}`,
      fill: "forwards"
    });
  }

}

afficherJoueurs();
* {
  box-sizing: border-box;
}

#stats-hockey {
  visibility: hidden;
  height: 0px;
}

.joueur {
  position: relative;
  width: 700px;
  border-bottom: 1px solid white;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  display: flex;
}

.nom {
  display: inline-block;
  background-color: lightblue;
  font-weight: bold;
  width: 280px;
}


.equipe {
  display: inline-block;
  background-color: rgb(153, 194, 192);
  width: 65px;
  text-align: center;
}

.buts {
  display: inline-block;
  background-color: lightblue;
  padding-left: 10px;
  width: 165px;
}

.tirs-au-but {
  display: inline-block;
  background-color: rgb(153, 194, 192);
  padding-left: 10px;
  width: 175px;
}
<pre id="stats-hockey">
        Connor McDavid;EDM;24;80;44;79;123;45;28;22:03;314
        Johnny Gaudreau;CGY;28;82;40;75;115;26;64;18:34;262
        Jonathan Huberdeau;FLA;28;80;30;85;115;54;35;19:25;222
        Leon Draisaitl;EDM;26;80;55;55;110;40;17;22:20;278
        Kirill Kaprizov;MIN;24;81;47;61;108;34;27;19:06;289
        Auston Matthews;TOR;24;73;60;46;106;18;20;20:36;348
        Steven Stamkos;TBL;31;81;42;64;106;36;24;18:28;241
        Matthew Tkachuk;CGY;24;82;42;62;104;68;57;17:53;253
        J.T. Miller;VAN;28;80;32;67;99;47;15;21:04;206 
        Mitchell Marner;TOR;24;72;35;62;97;16;23;20:52;224
        Roman Josi;NSH;31;80;23;73;96;46;13;25:32;281
        Artemi Panarin;NYR;30;75;22;74;96;18;21;19:12;177
        Kyle Connor;WPG;25;79;47;46;93;4;-3;21:46;317
        Mikko Rantanen;COL;25;75;36;56;92;56;35;20:58;254
        Patrick Kane;CHI;33;78;26;66;92;18;-19;21:49;287
        Alexander Ovechkin;WSH;36;77;50;40;90;18;8;20:34;334
        Aleksander Barkov;FLA;26;67;39;49;88;18;36;20:18;214
        Nathan MacKinnon;COL;26;65;32;56;88;42;22;21:03;299
        Nazem Kadri;COL;31;71;28;59;87;71;13;19:14;247
        Matt Duchene;NSH;30;78;43;43;86;38;6;19:00;228
        Cale Makar;COL;23;77;28;58;86;26;48;25:40;240
        Kevin Fiala;MIN;25;82;33;52;85;52;23;17:38;262
        Victor Hedman;TBL;31;82;20;65;85;36;26;25:04;219
        Filip Forsberg;NSH;27;69;42;42;84;22;12;18:05;226
        Jake Guentzel;PIT;27;76;40;44;84;44;13;20:05;264
        Sidney Crosby;PIT;34;69;31;53;84;32;19;19:58;208
        Elias Lindholm;CGY;27;82;42;40;82;22;61;19:56;235
        Vladimir Tarasenko;STL;30;75;34;48;82;32;7;16:54;230
        Sam Reinhart;FLA;26;78;33;49;82;13;25;17:45;186
        Sebastian Aho;CAR;24;79;37;44;81;38;18;18:57;221
        Mika Zibanejad;NYR;28;81;29;52;81;12;30;19:37;219
        Joe Pavelski;DAL;37;82;27;54;81;14;11;18:28;216
        William Nylander;TOR;25;81;34;46;80;16;-9;18:16;256
        Brad Marchand;BOS;33;70;32;48;80;97;16;19:14;242
        Jason Robertson;DAL;22;74;41;38;79;22;16;18:06;220
        Mats Zuccarello;MIN;34;70;24;55;79;24;21;18:35;159
        Alex DeBrincat;CHI;24;82;41;37;78;19;-13;20:51;270
        Evgeny Kuznetsov;WSH;29;79;24;54;78;44;7;20:16;208
        Chris Kreider;NYR;30;81;52;25;77;24;19;18:43;258
        David Pastrnak;BOS;25;72;40;37;77;20;13;18:36;312
        Robert Thomas;STL;22;72;20;57;77;16;17;18:46;115
        Timo Meier;SJS;25;77;35;41;76;54;-3;19:09;326
        Pavel Buchnevich;STL;26;73;30;46;76;34;29;18:18;199
        John Tavares;TOR;31;79;27;49;76;32;-8;18:04;237
        Jordan Kyrou;STL;23;74;27;48;75;20;10;16:34;188
        Adam Fox;NYR;23;78;11;63;74;26;18;23:54;158
        Jesper Bratt;NJD;23;76;26;47;73;16;0;17:25;197
        Roope Hintz;DAL;25;80;37;35;72;28;15;18:02;213
        John Carlson;WSH;31;78;17;54;71;20;13;23:48;195
        Mark Scheifele;WPG;28;67;29;41;70;23;-17;21:08;159
    </pre>
<!--J.T. Miller n'est pas en ordre à cause du point-->

<div id="liste">

  <div class="joueur">
    <div class="nom">Bill Barilko</div>
    <div class="equipe">TOR</div>
    <div class="buts">buts: 8</div>
    <div class="tirs-au-but">tirs: 35</div>
  </div>
  <div class="joueur">
    <div class="nom">Alexander Mogilny</div>
    <div class="equipe">BUF</div>
    <div class="buts">buts: 76</div>
    <div class="tirs-au-but">tirs: 323</div>
  </div>

</div>
Johannes
  • 64,305
  • 18
  • 73
  • 130