Answers for "html maintain text in one line"

CSS
0

html maintain text in one line

#parent {
    list-style: none;
    width: 100%;
    height: 90px;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
}

#parent > li {
    display: inline-block;
    width: 50%;
    height: 100%;
    background-color: red;
}

#parent > li:nth-child(even) {
    background-color: blue;
}
Posted by: Guest on January-18-2021
0

html maintain text in one line

<ul id="parent">
    <li>Box #1</li>
    <li>Box #2</li>
    <li>Box #3</li>
</ul>
Posted by: Guest on January-18-2021

Browse Popular Code Answers by Language