我正在使用并引用flexboxgrid css。我怎样才能有等高的列?我的侧栏id=dtside
有背景颜色,我希望它的高度与id=dtmain
. 在使用 flexboxgrid 之前,我正在使用display:table
并且display: table-cell
效果很好,但我们切换到了 flexbox。我试图将两者结合起来,结果不是我想要的。我还找到了一些在线解决方案,表明我只需要添加display:flex
到父级div
并尝试将其添加到两者中class=box
,class=row
但效果不佳。
<div class="box box-container" id="dtmaincontents">
<div class="row top-xs">
<div class="col-xs-12 col-md-8" id="dtmain">
<div class="col-main" data-name="Main Page Content">
<!--CS: Start Page Field: Page Content Snippet-->
<!--SPM:<%@Register Tagprefix="PageFieldRichHtmlField" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
<!--MS:<PageFieldRichHtmlField:RichHtmlField FieldName="f55c4d88-1f2e-4ad9-aaa8-819af4ee7ee8" runat="server">-->
<!--PS: Start of READ-ONLY PREVIEW (do not modify)--><!--PE: End of READ-ONLY PREVIEW-->
<!--ME:</PageFieldRichHtmlField:RichHtmlField>-->
<!--CE: End Page Field: Page Content Snippet-->
</div>
</div>
<div class="col-xs-12 col-md-4" id="dtside">
<div class="col-side" data-name="Side Page Content">
<!--CS: Start Page Field: Side Content Snippet-->
<!--SPM:<%@Register Tagprefix="PageFieldRichHtmlField" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
<!--MS:<PageFieldRichHtmlField:RichHtmlField FieldName="995e9a86-eb77-4305-9cbe-6ea7c7e21c43" runat="server">-->
<!--PS: Start of READ-ONLY PREVIEW (do not modify)--><!--PE: End of READ-ONLY PREVIEW-->
<!--ME:</PageFieldRichHtmlField:RichHtmlField>-->
<!--CE: End Page Field: Side Content Snippet-->
</div>
</div>
</div>
</div>
我尝试添加哪些作品,但如果display: flex
内容没有使用全宽,则侧栏会向左移动。#dtmaincontents
dtmain