html - 父 div 与子 div 一起显示
问题描述
我当前的输出看起来像这样。我试图弄清楚如何让“一般税务知识(compFamilyHierarchyName 类)在蓝色框旁边垂直运行,看起来像这样。
我得到的最接近的是将 display:flex 添加到 compFamilyHierarchyName,它看起来像这样- “一般税务知识”在正确的位置,但蓝色框现在在同一行,我不知道如何让他们回到彼此之上。
我感谢任何帮助或指示。谢谢!
.outerCompFamilyName{
width:60px;
background: #009CDE;
position: relative;
border-top: 1px solid white;
}
.innerCompFamilyName{
color: white;
position: absolute;
bottom: 36%;
left: -30%;
transform: rotate(-90deg);
}
.whiteCDF {
background: white;
padding: 10px;
border-bottom: 1px solid black;
border-right: 1px solid black;
}
<div class="compFamilyHierarchyName">General Tax Knowledge
<div style ="display:flex" class="FunctionalExpertise Credits_Incentives_Methods column">
<div class="outerCompFamilyName">
<div class="innerCompFamilyName" >Accounting Methods and Periods</div>
</div>
<div id="BuildingProfessionalNetworksTest16" style="width: 95%; background: slategrey;">
<div class="whiteCDF">Approaches and participates in all internal/external interactions with professionalism</div><div class="whiteCDF">Actively develops an internal/external network and relationships to grow one’s career, enhance business advisor status with clients, build the practice and serve clients; knows the right people in market/industry</div>
</div>
</div>
</div>
<div style ="display:flex" class="FunctionalExpertise Credits_Incentives_Methods column">
<div class="outerCompFamilyName">
<div class="innerCompFamilyName" >Planning and Consulting</div>
</div>
<div id="BuildingProfessionalNetworksTest17" style="width: 95%; background: slategrey;">
<div class="whiteCDF">Approaches and participates in all internal/external interactions with professionalism</div><div class="whiteCDF">Actively develops an internal/external network and relationships to grow one’s career, enhance business advisor status with clients, build the practice and serve clients; knows the right people in market/industry</div>
</div>
</div>
</div>
</div>
对于上下文 -这是我们试图为网站重新创建的外观。这是以前宣传的材料/内部通信的一般组织,因此我们正在尽最大努力重新创建它以保持连续性。
解决方案
推荐阅读
- reactjs - 具有多个孩子的高阶组件
- javascript - 为什么当第二个事件监听器被触发时第一个事件监听器停止工作?
- angular - 在 TypeScript 中通过 innerHTML 加载 Angular 组件
- javascript - Cordova 电子发布到 s3
- maxscale - 如何更改 GUI 的默认 MaxScale 凭据
- javascript - 如何从 Firestore 中检索特定范围的数据
- python - WinAppDriver,clickOnce 应用程序启动一个对话框 - 查找应用程序的问题
- c# - swagger REST API 补丁请求更改模型的一个字段
- python - 解决Python线性数学优化问题-向量-易约束
- reactjs - 调度 redux 事件时,我的 useEffect() 挂钩运行多次?