Search code examples
javascripthtmlcsslinebreak

how do I write <br> in javascript


Hi I want insert break line tag in javascript and tried everything from stackowerflow,but nothing helped me. Here is my github repo for.js file and I need make breakline between line 204 and 205 like this . I mean need third section under second one ,check it here turashviliguro.github.io/d2symbols I will be happy if you help me.

"Seals": [
                new Glyph(0xE076, "Stasis: Glyph 0", Colors.STASIS),
                new Glyph(0xE077, "Stasis: Glyph 1", Colors.STASIS),
                new Glyph(0xE078, "Stasis: Glyph 2", Colors.STASIS),
                new Glyph(0xE079, "Stasis: Glyph 3", Colors.STASIS)
            ],
            <need breakline here>
            "Other": [
                new Glyph(0xE052, "Light", Colors.EXPERIENCE),
                new Glyph(0xE059, "Settings"),
                new Glyph(0xE147, "Gilded", Colors.GILDED_FG, Colors.GILDED_BG),
                new Glyph(0xE148, "Cabal Gold", Colors.LEGENDARY_LABEL),
                 new Glyph(0xE142, "Headshot")

            ],


Solution

  • If I understand you correctly you want a grid that looks like this:

    | COMBAT | CHARACTER  | KEYBOARD |
    |        | CONTROLLER |          |
    

    enter image description here

    Than you can try this:

    main {
      display: grid;
      grid-gap: 0.5em;
    }
    
    main>section:nth-child(1) {
      grid-row: 1/3;
    }
    
    main>section:nth-child(2) {
      grid-row: 1;
    }
    
    main>section:nth-child(3) {
      grid-row: 2/4;
      margin-top: 0.3em;
    }
    
    main>section:nth-child(4) {
      grid-row: 1/3;
    }