DEV Community

[Comment from a deleted post]
Collapse
 
akdeberg profile image
Anik Khan

@paukaradagian Hey! You have to fix it from CSS. As I used flexbox for positioning the element, I have to make it with flexbox.
Add this code to the CSS file-

/*TEST*/
.break {
    flex-basis: 100%;
    height: 0;
}

Then whenever you want a line break insert this-

<div class="break"></div> <!--For new line break -->

Say for example you want a line after the L then it would be like-

 <div data-key="75" class="key">
            <kbd>K</kbd>
            <span>Snare</span>
        </div>
        <div data-key="76" class="key">
            <kbd>L</kbd>
            <span>SY</span>
        </div>

        <div class="break"></div> <!--For new line break -->

        <div data-key="90" class="key">
            <kbd>Z</kbd>
            <span>SY</span>
        </div>
        <div data-key="90" class="key">
            <kbd>X</kbd>
            <span>SY</span>
        </div>
        <!-- Just like this continue........ -->

Box will adjust until you add up to 9 divs. Further question? Plz knock me on the chat or LinkedIn (can be found from my profile); love to collaborate.

Collapse
 
paukaradagian profile image
π“Ÿπ“ͺ𝓾𝓡𝓲𝓷π“ͺβ€οΈπ“šπ“ͺ𝓻π“ͺ𝓭π“ͺ𝓰𝓲π“ͺ𝓷

Thank you so, so so much!!!