When using flexbox for styling, if the parent container is set to display: flex, this will result in it <hr />being displayed vertically rather than horizontally.
display: flex
<hr />
.container { display: flex; flex: 1; }
<div class='container'> <h2>Test</h2> <hr /> </div>
Use flex-grow: 1or width: 100%to make it grow to fit the width of the parent. You probably want to use this in conjunction with flex-wrap: wrapon .containerif you plan to accommodate more flexible children in.container
flex-grow: 1
width: 100%
flex-wrap: wrap
.container
.container { display: flex; flex: 1; } hr { flex-grow: 1; /* width: 100%; */ /* or this */ }
<div class='container'> <hr> </div>
, align-items stretch, hr , flex-container h2. justify-content flex-start, hr 0.
align-items
stretch
hr
flex-container
h2
justify-content
flex-start
- flex-wrap: wrap flex: 0 0 100% hr
flex: 0 0 100%
.container { display: flex; flex-wrap: wrap; } hr { flex: 0 0 100%; }
<div class='container'> <h2>Test</h2> <hr> </div>
Source: https://habr.com/ru/post/1673058/More articles:Multiple choices in wagtail admin - pythonПолучить ответный путь маршрутизатора в реквизитах с помощью reducex ownProps - reactjsHow to make Azure function output JSON to browsers - jsoncron runtime (including DST) - timezoneHow to speed up the loading time of the Gensim Word2vec model? - deep-learningHow to determine the type of an import variable - typescriptHow to find the first nonzero values in groups? (secondary sorting using api dataset) - apache-sparkIs it possible to create an object and call a method in one expression? - c ++(Android-O) The application is not listed in the "access-use applications", but is located in Nougat - androidСимволика ссылок github не существует. - htmlAll Articles