Bold text inside a flex container not appearing inline

I've got div containers that are using flex. I have a bold senescence inside my flex child containers.

example

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc at lectus vitae libero pulvinar fringilla. Nullam vel vestibulum orci.

However, when I create my flex container it's not making the bold text inline. It's creating a block between the regular text and the bold text.

example

Lorem ipsum dolor

sit amet, consectetur adipiscing elit. Nunc at lectus vitae libero pulvinar fringilla. Nullam vel vestibulum orci.

I've set my flex container as follows:

.flexparent { display: flex; flex-direction: row; justifty-content: center; flex-wrap: wrap-reverse }
.flexchild1 { display: inline-flex; flex-direction: column; flex-wrap: nowrap; justify-contetn: center; width: 65%; margin-right: 4%;}
.flexchild2 { display: inline-flex; flex-direction: column; flex-wrap: nowrap; justify-contetn: center; width: 35%;}

My ideal solution is something like this where .flexchild1 is green and .flexchild2 is yellow.


If you're going to use a flex container, keep in mind that all child elements will become flex items and stack vertically or horizontally, depending on flex-direction .

So, if we consider this code:

<div class="flex-container"><b>Lorem ipsum dolor sit amet</b> consectetur adipiscing elit. <span>Nunc at lectus vitae libero</span> pulvinar fringilla. <i>Nullam vel vestibulum orci.</i></div>

Although, the <b> , <span> and <i> elements are inline-level in a block formatting content...

.flex-container {
    display: block;
    flex-direction: row;
    background-color: lightgreen;
}

span { color: red; }
<div class="flex-container"><b>Lorem ipsum dolor sit amet</b> consectetur adipiscing elit. <span>Nunc at lectus vitae libero</span> pulvinar fringilla. <i>Nullam vel vestibulum orci.</i></div>
链接地址: http://www.djcxy.com/p/75994.html

上一篇: 列出像1)2)3)

下一篇: 柔性容器内的粗体文本不以内联方式显示