Edited at

ulの左端を揃えたまま中央寄せする

More than 1 year has passed since last update.


html

<div class="content-txt">

<p class="txt-center">
タイトル
</p>
<div class="ul-align-center">
<ul>
<li>1行目</li>
<li>2行目2行目</li>
<li>3行目3行目3行目</li>
</ul>
</div>
<p class="txt-right">
右寄せ
</p>
</div>


sass

.content-txt{

border: 1px solid;

.txt-center{
text-align: center;
}
.txt-right{
text-align: right;
}
ul{
list-style: disc;
padding-left: 15px;
}
.ul-align-center{
display: flex;
align-items: center;
flex-direction: column;
}
}


結果

image.png

http://jsfiddle.net/2fsz3xav/9/