Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I need to align 2 paragraphs side by side so that I can have all the information taking up less vertical space.

I need for one column to take up around 25% of the whole page's width, so that both columns take up around 50% of the page's width.

Thanks in advance

question from:https://stackoverflow.com/questions/66046391/align-2-paragrahs-next-to-each-other

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
122 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can use flexbox CSS modal to control the content flow

.flex-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 50%;
}
.flex-wrapper .item {
    flex: 0 0 auto;
    width: 50%;
}
<div class="flex-wrapper">
    <p class="flex-item">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Exercitationem quia cumque aspernatur ut modi suscipit. Sunt natus reiciendis, quisquam enim iste facere incidunt voluptate voluptates amet, minus cupiditate molestiae provident.
    </p>
    <p class="flex-item">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Exercitationem quia cumque aspernatur ut modi suscipit. Sunt natus reiciendis, quisquam enim iste facere incidunt voluptate voluptates amet, minus cupiditate molestiae provident.
    </p>
</div>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...