- Angular UI Development with PrimeNG
- Sudheer Jonna Oleg Varaksin
- 112字
- 2021-07-15 17:33:01
Nested columns
Columns can be nested in more complex layouts. To achieve that, just nest elements with the ui-g-* style classes:
<div class="ui-g">
<div class="ui-g-8 ui-g-nopad">
<div class="ui-g-6">6</div>
<div class="ui-g-6">6</div>
<div class="ui-g-12">12</div>
</div>
<div class="ui-g-4">4</div>
</div>
With this structure, columns with different content will not have equal height. There is a more robust solution to force equal height for columns with different content. Just wrap the internal div elements inside another div with the ui-g style class or even simpler, assign ui-g to the column having nested columns:
<div class="ui-g">
<div class="ui-g ui-g-8 ui-g-nopad">
<div class="ui-g-6">6<br/>6<br/>6<br/>6<br/>6<br/>6<br/></div>
<div class="ui-g-6">6</div>
<div class="ui-g-12">12</div>
</div>
<div class="ui-g-4">4</div>
</div>
The result looks like the following:

Columns have a default padding of 0.5em. To remove it, you need to apply the ui-g-nopad style class. This was demonstrated in the earlier examples.
推薦閱讀
- Clojure Programming Cookbook
- Ext JS Data-driven Application Design
- 零基礎學Java程序設計
- Serverless Web Applications with React and Firebase
- 零基礎輕松學C++:青少年趣味編程(全彩版)
- 超好玩的Scratch 3.5少兒編程
- Mastering Apache Camel
- 百萬在線:大型游戲服務端開發
- TypeScript全棧開發
- Building Microservices with Go
- JavaScript程序設計實例教程(第2版)
- C#教程
- Java編程動手學
- jMonkeyEngine 3.0 Cookbook
- Java核心技術卷I基礎知識(原書第9版)