css - Table-like layout using angular material design -
is there way let angular material design layouts align both lines , columns, table ?
to make things clear, align cells in table below.
of course add flex="xxx"
problem don't want fix width of columns.
i'm interested in css / flexbox solution.
<html lang="en" > <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/angular_material/1.1.0/angular-material.min.css"> </head> <body ng-app="blankapp" ng-cloak> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-animate.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-aria.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-messages.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/angular_material/1.1.0/angular-material.min.js"></script> <script type="text/javascript"> angular.module('blankapp', ['ngmaterial']); </script> <style> .mycell { border: solid black 1px; padding: 10px; } </style> <div layout="column"> <div layout="row"> <div class="mycell">row 1, cell 1</div> <div class="mycell">row 1, cell 2</div> <div class="mycell">row 1, cell 3</div> </div> <div layout="row"> <div class="mycell">a longer cell</div> <div class="mycell">row 2, cell 2</div> <div class="mycell">row 2, cell 3</div> </div> </div> </body> </html>
is kind of thing mean? - codepen
markup
<div ng-controller="appctrl" ng-cloak="" ng-app="myapp" layout="column"> <div layout="column" flex> <div layout="row" flex> <div class="mycell" flex>row 1, cell 1</div> <div class="mycell" flex>row 1, cell 2</div> <div class="mycell" flex>row 1, cell 3</div> </div> <div layout="row" flex> <div class="mycell" flex>a longer cell</div> <div class="mycell" flex>row 2, cell 2</div> <div class="mycell" flex>row 2, cell 3</div> </div> </div> </div>
Comments
Post a Comment