Last active
September 3, 2018 21:41
-
-
Save olar94/09dc3f7c71a6004c561a33043006799b to your computer and use it in GitHub Desktop.
add new post button
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( is_user_logged_in() ) { ?> | |
<div class="add_post"><a href="https://youthyork.eu/frontend-editor/">Write new post</a> </div> | |
<?php } ?> | |
.add_post{ | |
-webkit-transform: rotate(-90deg); /*Поворот блока с текстом н 30 градусов*/ | |
-moz-transform: rotate(-90deg); | |
-ms-transform: rotate(-90deg); | |
-o-transform: rotate(-90deg); | |
transform: rotate(-90deg); | |
position:fixed; /*фиксированная позиция при прокрутке*/ | |
z-index:999; | |
right: 5px; /*отступ с права*/ | |
top: 35%; /*отступ сверху*/ | |
margin-right:-50px; /*отрицательный отступ справа (чем длиннее название кнопки тем больше должно быть значение данного отступа )*/ | |
} | |
.add_post a{ | |
color:#fff!important; /*цвет ссылки*/ | |
display:block; | |
background:#DC3522; /*цвет фона кнопки*/ | |
font-size:12px; /*размер шрифта*/ | |
text-align:center; /*выравнивание по центру*/ | |
padding:10px 20px; /*внутренние отступы*/ | |
border-radius:5px; /*радиус скругления углов*/ | |
border:1px solid #fff; /*рамка вокруг кнопки*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment