Masahiro's tech note
PostsProjectsAbout
PostsProjectsAbout
Backback arrow icon
CSS

margin 0 auto とmargin-topを共存させる方法

// だめ
margin-top: 20px;
margin: 0 auto;

// いける
margin: 20px auto 0;

参考記事

CSS margin auto center with top margin – VALID?

Featured
margin 0 auto とmargin-topを共存させる方法
2022/02/11
CSS
CSSでbackground imageをいい感じに設置する方法
2022/02/10
CSS
Circled number with pure CSS
2021/01/08
CSS
border-bottomを文字数にCSSのみで合わせる方法
2020/08/31
CSS
違うポートの画像の表示方法
2017/09/06
CSS
Flask
html
JavaScript

github
twitter
menta
mail
copyright © 2016-2023 Masahiro Okubo