Align switch to vertical center

This commit is contained in:
Simon Stürz 2018-08-02 09:19:57 +02:00 committed by Michael Zanetti
parent 8e31ec055c
commit 54bf6113bc
3 changed files with 20 additions and 4 deletions

View File

@ -21,10 +21,12 @@ HTML.postheader = \
" <li><a href=\"jsonrpc.html\">API</a></li>\n" \
" <li><a href=\"write-plugins.html\">Write Plugins</a></li>\n" \
" <li>\n" \
" <label class=\"switch\">\n " \
" <input type=\"checkbox\" onclick=\"onSwitchChanged(this)\" id=\"themeSwitch\">\n" \
" <span class=\"slider round\"></span>\n" \
" </label>\n" \
" <div class=\"switchAligner\" >\n" \
" <label class=\"switch\">\n " \
" <input type=\"checkbox\" onclick=\"onSwitchChanged(this)\" id=\"themeSwitch\">\n" \
" <span class=\"slider round\"></span>\n" \
" </label>\n" \
" </div>\n" \
" </li>\n" \
" </ul>\n" \
" </div>\n" \

View File

@ -1004,6 +1004,13 @@ div.footer p {
}
}
.switchAligner {
min-height: 100px;
display: flex;
align-items: center;
justify-content: center;
}
.switch {
position: relative;
display: inline-block;

View File

@ -1011,6 +1011,13 @@ div.footer p {
height: 34px;
}
.switchAligner {
min-height: 100px;
display: flex;
align-items: center;
justify-content: center;
}
.switch input {display:none;}
.slider {