position of buttons

+2 wiliam pierce · March 8, 2015
ive made some progress for my social media buttons but any input
is still appreciated.
ive got some buttons on my site within my header but I want them
positioned to the right not center where they currently are.

CSS:
          
@font-face {
    font-family: 'si';
    src: url('PATH_TO/socicon.eot');
    src: url('PATH_TO/socicon.eot?#iefix') format('embedded-opentype'),
         url('PATH_TO/socicon.woff') format('woff'),
         url('PATH_TO/socicon.ttf') format('truetype'),
         url('PATH_TO/socicon.svg#icomoonregular') format('svg');
    font-weight: normal;
    font-style: normal;
 
}
 
@media screen and (-webkit-min-device-pixel-ratio:0) {
    @font-face {
        font-family:si;
        src: url(PATH_TO/socicon.svg) format(svg);
    }
}
.soc {
    overflow:hidden;
    margin:0; padding:0;
    list-style:none;
}
.soc li {
    display:inline-block;
    *display:inline;
    zoom:1;
}
.soc li a {
    font-family:si!important;
    font-style:normal;
    font-weight:400;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
    -webkit-box-sizing:border-box;
    -moz-box-sizing:border-box;
    -ms-box-sizing:border-box;
    -o-box-sizing:border-box;
    box-sizing:border-box;
    -o-transition:.1s;
    -ms-transition:.1s;
    -moz-transition:.1s;
    -webkit-transition:.1s;
    transition:.1s;
    -webkit-transition-property: transform;
    transition-property: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    overflow:hidden;
    text-decoration:none;
    text-align:center;
    display:block;
    position: relative;
    z-index: 1;
    width: 35px;
    height: 35px;
    line-height: 35px;
    font-size: 19px;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    border-radius: 20px;
    margin-right: 10px;
    color: #ffffff;
    background-color: none;
}
.soc a:hover {
    z-index: 2;
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
}

.soc-icon-last{
    margin:0 !important;
}
.soc-twitter {
    background-color: #4da7de;
}
.soc-twitter:before {
    content:'a';
}
.soc-facebook {
    background-color: #3e5b98;
}
.soc-facebook:before {
    content:'b';
}
.soc-google {
    background-color: #d93e2d;
}
.soc-google:before {
    content:'c';
}
.soc-pinterest {
    background-color: #c92619;
}
.soc-pinterest:before {
    content:'d';
}
.soc-linkedin {
    background-color: #3371b7;
}
.soc-linkedin:before {
    content:'j';
}
.soc-rss {
    background-color: #f26109;
}
.soc-rss:before {
    content:',';
}


Post a Reply

Replies

Oldest  Newest  Rating
0 Roman Smirnov · March 8, 2015
try http://www.w3schools.com/tags/att_input_align.asp
There are various ways. I like using a grid system and inserting my content in the columns which are on the part of the screen that I need. See here for example http://getbootstrap.com/css/#grid
  • 1

HTML / CSS / Web Design

107,087 followers
About

Discuss, share, ask, learn and teach HTML5 and CSS3.

Links
Moderators