My current issue can be illustrated through two code examples:
The first example functions properly when the fieldset
is not included.
In the second example, including the fieldset
causes the layout to extend beyond the window when there is long text (in full-page view).
Shortening the text resolves the issue and the layout conforms to the flex layout.
The challenge I'm facing is that excluding the fieldset
in the current layout works well in Chrome and Firefox, but fails in IE11. When I add the fieldset
, the layout looks good in all browsers, but the mentioned problem arises when adding a long text in the text field. Unfortunately, this text field is for posting a link, so it is expected that the text can easily become lengthy.
I came across a post showing a rough representation of how my page looks without the fieldset
.
https://github.com/angular/material/issues/5084
Here are the two code snippets: the functioning one:
angular.module('MyApp', ['ngMaterial']);
<link href="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-animate.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-aria.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.js"></script>
<body ng-app="MyApp">
<!-- <fieldset> -->
<div style="display: flex; margin: 1em">
<div flex="100" layout="row">
<!-- main information field -->
<div flex='90'>
<div layout='row' flex='100'>
<div layout="column" flex="50" >
<label>Externe notities</label>
<md-content>
<div>kjfsdlafsdja;gaagj;gsahgh;gas;hoisgr;hoisohig;asgk;hlgshlksgfhli;gfhlisgohi;sghoisgdiasghvvsdbjkgasdohisgfdhusgfhu;;uhksgdjsgk;dxbhj;sgd;hisghsguho;sguho;susgsgdbjkvdjhsdihlsfdjbkdshoi;gsdbjk;gebuk;svdukssgho8sgou;hsegbusfdsugoiusdgogu;sgd;oiisgr;uesgodlosdsdgldsglidsgluisdg
</div>
</md-content>
</div>
<div layout="column" flex="50">
<label>Interne notities</label>
<md-content>
<div>
What is Lorem Ipsum? Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley...
</div>
</md-content>
</div>
</div>
</div>
<!-- stop light -->
<div flex='10'>
<img height="100" src="https://www.portacon.nl/magento/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/d/r/driekleurig_verkeerslicht_828x696_web.jpg" alt="stoplicht-wit" />
</div>
</div>
</div>
<!-- </fieldset> -->
</body>
and the non-functional one with fieldset
enabled:
angular.module('MyApp', ['ngMaterial']);
<link href="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-animate.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-aria.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.js"></script>
<body ng-app="MyApp">
<fieldset>
<div style="display: flex; margin: 1em">
<div flex="100" layout="row">
<!-- main information field -->
<div flex='90'>
<div layout='row' flex='100'>
<div layout="column" flex="50" >
<label>Externe notities</label>
<md-content>
<div>kjfsdlafsdja;gaagj;gsahgh;gas...
</div>
</md-content>
</div>
<div layout="column" flex="50">
<label>Interne notities</label>
<md-content>
<div>
What is Lorem Ipsum? Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley...
</div>
</md-content>
</div>
</div>
</div>
<!-- stop light -->
<div flex='10'>
<img height="100" src="https://www.portacon.nl/magento/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/d/r/driekleurig_verkeerslicht_828x696_web.jpg" alt="stoplicht-wit" />
</div>
</div>
</div>
</fieldset>
</body>
Question
Is it possible to resolve the layout issue with the fieldset
? If so, how can this be achieved?