float right element inverted - html

In my header I have 4 elements which are:
"Running Days" - "admin#email.com" - "Deposit" - "Paidout".
My 4 elements are separated into 2.
"Deposit" and "Paidout" are in right in my header.
I made a float:right!
Except that the order is inverted namely I have "Paidout" before "Deposit".
header {
width: 100%;
height: 38px;
background-color: #CEECE8;
}
.subtitles {
font-size: 13px;
font-family: 'Roboto Slab', serif;
padding-top: 8px;
padding-left: 80px;
padding-right: 80px;
text-transform: uppercase;
}
.subtile-left {
display: inline-block;
padding-left: 18px;
}
.subtile-right {
display: inline-block;
padding-left: 18px;
float: right;
}
<header>
<div class="subtitles">
<div class="subtile-left"><i class="far fa-calendar"></i> 137 Running Days </div>
<div class="subtile-left"><i class="far fa-envelope"></i> Admin#superbtc.biz </div>
<div class="subtile-right"><i class="fas fa-caret-right"></i> Deposit </div>
<div class="subtile-right"><i class="fas fa-caret-right"></i> Paidout </div>
</div>
</header>

Use float:left with the left elements instead and adjust text-align to align the other to the right:
header {
width: 100%;
height: 38px;
background-color: #CEECE8;
}
.subtitles {
font-size: 13px;
font-family: 'Roboto Slab', serif;
padding-top: 8px;
padding-left: 80px;
padding-right: 80px;
text-transform: uppercase;
text-align:right;
}
.subtile-left {
display: inline-block;
padding-left: 18px;
float: left;
}
.subtile-right {
display: inline-block;
padding-left: 18px;
}
<header>
<div class="subtitles">
<div class="subtile-left"><i class="far fa-calendar"></i> 137 Running Days </div>
<div class="subtile-left"><i class="far fa-envelope"></i> Admin#superbtc.biz </div>
<div class="subtile-right"><i class="fas fa-caret-right"></i> Deposit </div>
<div class="subtile-right"><i class="fas fa-caret-right"></i> Paidout </div>
</div>
</header>
A better way would be to consider flexbox to avoid having the whitespace issue between inline-block elements:
header {
width: 100%;
height: 38px;
background-color: #CEECE8;
}
.subtitles {
font-size: 13px;
font-family: 'Roboto Slab', serif;
padding-top: 8px;
padding-left: 80px;
padding-right: 80px;
text-transform: uppercase;
display:flex;
}
.subtitles :nth-child(2) {
margin-right:auto;
}
.subtile-left {
padding-left: 18px;
}
.subtile-right {
padding-left: 18px;
}
<header>
<div class="subtitles">
<div class="subtile-left"><i class="far fa-calendar"></i> 137 Running Days </div>
<div class="subtile-left"><i class="far fa-envelope"></i> Admin#superbtc.biz </div>
<div class="subtile-right"><i class="fas fa-caret-right"></i> Deposit </div>
<div class="subtile-right"><i class="fas fa-caret-right"></i> Paidout </div>
</div>
</header>

Elements are floated in order of source appearance.
Check this example:
.container {
background-color: #ddd;
}
.container::after { /* clearfix */
display: block;
content: "";
clear: both;
}
[id] {
background-color: #f0f0f0;
border: 3px dotted #999;
text-align: center;
width: 2em;
}
#a {
float: right;
}
<div class="container">
<div id="a">A</div>
<div id="b">B</div>
<div id="c">C</div>
</div>
div#a floats right, which means it is moved as far to the right of its container as possible.
Now let's make div#b float to the right as well:
.container {
background-color: #ddd;
}
.container::after { /* clearfix */
display: block;
content: "";
clear: both;
}
[id] {
background-color: #f0f0f0;
border: 3px dotted #999;
text-align: center;
width: 2em;
}
#a,
#b {
float: right;
}
<div class="container">
<div id="a">A</div>
<div id="b">B</div>
<div id="c">C</div>
</div>
Now when the layout engine parses the layout, the first element that is floated is div#a (because it comes before div#b in the source), moving it to the very right side of div.container.
Next comes div#b, which is now also floated to the right. Since div#a is already taking space at the right side of div.container, div#b can only float until its right border touches the left border of div#a.
This obviously makes it so visual appearance of div#a and div#b is inverted compared to source order.

When the viewport is rendering the HTML it reads the elements from top bottom.
This means the following:
1) 'Deposit' is seen before 'Paidout' and thus is floated to the right part of the container div first
2) Paidout is seen and floats to the right, but bumps into deposit and thus finds its place to the left of it

Related

How to keep icons aligned strictly inside div?

I am making a sidebar and am new to css. I created a div which represents a closed sidebar. It is supposed to only show the icons. Unfortunately the icons come in a misaligned manner inside the div based on their size. How do I fix this?
.sidenav {
height: 492px;
width: 300px;
background-color: #db3d44;
}
.data-icon {
font-size: 45px;
color: black;
opacity: 0.5;
float: left;
margin-left: 9px;
margin-top: 5px;
margin-bottom: 10px;
}
.hamburger {
background-color: transparent;
border-color: transparent;
color: white;
margin-left: 10px;
margin-top: 4px;
font-size: 25px;
}
.hamburger:hover {
color: black;
}
.sidenav-closed {
width: 65px;
float: left;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="sidenav-closed sidenav">
<button class="hamburger data-disappear">☰</button>
<div class="icons-only">
<div class="data-icon">
<i class="fa fa-home"></i>
</div>
<div class="data-icon">
<i class="fa fa-car"></i>
</div>
<div class="data-icon">
<i class="fa fa-home"></i>
</div>
</div>
</div>
The car icon is misaligned here. What's the solution?
You could try to align all the icons to the center so your .data-icon class could look like this:
.data-icon {
font-size: 45px;
color: black;
opacity: 0.5;
display: block;
width: 100%;
text-align: center;
}
Your div elements doesn't have set width and height in CSS - so the icons are strictly aligned inside them.
If you want to vertically center them and learn something new use flexbox:
.icons-only {
display: flex;
flex-direction: column;
align-items: center;
}
and
.data-icon {
...
margin-left:0
}
Your car icon is also a little bit bigger than house - you can a little change it size by add new class to it or use this:
.data-icon:nth-child(2) {
font-size: 40px;
}
This CSS code will take second (=2) element with class .data-icon and set different font size for it
The icons are inline elements so they will be left aligned by default. Add in that the icons are not that same size (this is normal), you get an uneven alignment.
To remedy this, add text-align: center to .icons-only.
Note: Given the layout in the example, it does not appear necessary to float .data-icon to the left.
.sidenav {
height: 492px;
width: 300px;
background-color: #db3d44;
}
.icons-only {
text-align: center;
}
.data-icon {
color: rgba( 0, 0, 0, 0.5 );
font-size: 45px;
}
.hamburger {
background-color: transparent;
border-color: transparent;
color: white;
margin-left: 10px;
margin-top: 4px;
font-size: 25px;
}
.hamburger:hover {
color: black;
}
.sidenav-closed {
width: 65px;
float: left;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="sidenav-closed sidenav">
<button class="hamburger data-disappear">☰</button>
<div class="icons-only">
<div class="data-icon">
<i class="fa fa-home"></i>
</div>
<div class="data-icon">
<i class="fa fa-car"></i>
</div>
<div class="data-icon">
<i class="fa fa-home"></i>
</div>
</div>
</div>

Equal height div within bootstrap column

I have a group of three columns. Inside each column is the following:
A small circular div, which contains a font-awesome icon.
A small heading tag
Another div, which contains some text and a button.
I have been having issues with getting the third item to be an equal height with each other. I also need the buttons to be on the same height as well. I understand how to make divs the same height (shown here!)
However, I cannot get these divs to be of an equal height, and with the button to be in the same position. Here is the HTML code:
<div class="container-fluid">
<div class="row justify-content-center h-100">
<div class="col-3">
<div class="circleAboutUs">
<i class="fas fa-user-astronaut fa-5x" style="color: white; padding-top: 25px; padding-left: 34px;"></i>
</div>
<h1 class="about-us-text">Hackers</h1>
<div class="about-us-content-container">
<div class="about-us-content-text">
The early registration deadline is October 15th and regular registration closes November 3rd.
For more information check out the FAQ!
</div>
<button class="about-us-button" type="button"><h2>Register</h2></button>
</div>
</div>
<div class="col-3">
<div class="circleAboutUs">
<i class="fab fa-reddit-alien fa-5x" style="color: white; padding-top: 30px; padding-left: 28px"></i>
</div>
<h1 class="about-us-text">Mentors</h1>
<div class="about-us-content-container">
<div class="about-us-content-text">
Interested in volunteering to help our hackers the day of the event?
Sign up here to be a mentor for Codestellation.
</div>
<button class="about-us-button" type="button"><h2>Sign Up</h2></button>
</div>
</div>
<div class="col-3">
<div class="circleAboutUs">
<i class="fas fa-space-shuttle fa-rotate-270 fa-5x" style="color: white; padding-right: 27px; padding-top: 14px; padding-bottom: 5px"></i>
</div>
<h1 class="about-us-text">Sponsors</h1>
<div class="about-us-content-container">
<div class="about-us-content-text">
Codestellation can&#8217t take off without our sponsors!
Learn more about what perks you&#8217ll recieve and how your partnership will contribute to the event.
</div>
<button class="about-us-button" type="button"><h2>Sponsor</h2></button>
</div>
</div>
</div>
Here is the CSS:
.circleAboutUs {
border: 3px solid #FAA880;
margin: 0 auto;
border-radius: 100%;
height: 140px;
width: 140px;
background-color: #FAA880;
}
.about-us-content-container {
margin: auto;
border-radius: 10%;
background-color: #FAA880;
text-align: center;
margin-bottom: 60px;
}
.about-us-content-text {
font-family: 'Mina', 'Montserrat', monospace;
padding: 25px 25px;
font-size: 2em;
}
.about-us-text {
text-align: center;
color: #3A318C;
font-family: 'Mina', 'Montserrat', monospace;
font-weight: bold;
padding-top: 10px;
padding-bottom: 10px;
}
.about-us-button {
border-radius: 20%/50%;
border: 1px solid black;
text-align: center;
font-family: 'Mina', 'Montserrat', monospace;
font-weight: bold;
color: #3A318C;
margin-bottom: 10px;
padding-top:10px;
}
.about-us-button:hover {
cursor: pointer;
background-color: white;
}
.col-sm > .about-us-content-container {
height: 55px;
}
It currently looks this: Example
I want it to maintain its responsiveness, so the header and the div still stack nicely on mobile.
This behavior can be easily achieved by using flex box.
First, we create div wrapper for every child of all the columns in bootstrap.
We set the height of those children to 100% in order to make them fill the whole containers.
Then, we set flex-grow: 1 so the about-us-content-container will fill the whole container including spare spaces.
But now about-us-content-container will have an auto margin, which prevents it from filling the whole container. So, we have to set the margin to 0.
The about-us-content-container now fills all the spaces. But the button is still not at the bottom. We can get this by doing the same thing
Setting display to flex.
Setting flex-grow of the about-us-content-text to 1.
The buttons are now filling the whole width of about-us-content-container now. To avoid this, wrap a div around the buttons.
Here is the solution in Codepen: https://codepen.io/anhanhvina/pen/WKmoWQ
Below is the code that works. You can now add more classes to make it responsive.
.col-3 > div {
display: flex;
flex-direction: column;
height: 100%;
}
.about-us-content-container {
flex-grow: 1;
display: flex;
flex-direction: column;
margin: 0 !important;
}
.about-us-content-text {
flex-grow: 1;
}
.circleAboutUs {
border: 3px solid #FAA880;
margin: 0 auto;
border-radius: 100%;
height: 140px;
width: 140px;
background-color: #FAA880;
}
.about-us-content-container {
margin: auto;
border-radius: 10%;
background-color: #FAA880;
text-align: center;
margin-bottom: 60px;
}
.about-us-content-text {
font-family: 'Mina', 'Montserrat', monospace;
padding: 25px 25px;
font-size: 2em;
}
.about-us-text {
text-align: center;
color: #3A318C;
font-family: 'Mina', 'Montserrat', monospace;
font-weight: bold;
padding-top: 10px;
padding-bottom: 10px;
}
.about-us-button {
border-radius: 20%/50%;
border: 1px solid black;
text-align: center;
font-family: 'Mina', 'Montserrat', monospace;
font-weight: bold;
color: #3A318C;
margin-bottom: 10px;
padding-top:10px;
}
.about-us-button:hover {
cursor: pointer;
background-color: white;
}
.col-sm > .about-us-content-container {
height: 55px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.2/css/bootstrap.min.css" rel="stylesheet" />
<div class="container-fluid">
<div class="row justify-content-center h-100">
<div class="col-3">
<div>
<div class="circleAboutUs">
<i class="fas fa-user-astronaut fa-5x" style="color: white; padding-top: 25px; padding-left: 34px;"></i>
</div>
<h1 class="about-us-text">Hackers</h1>
<div class="about-us-content-container">
<div class="about-us-content-text">
The early registration deadline is October 15th and regular registration closes November 3rd. For more information check
out the FAQ!
</div>
<div>
<button class="about-us-button" type="button">
<h2>Register</h2>
</button>
</div>
</div>
</div>
</div>
<div class="col-3">
<div>
<div class="circleAboutUs">
<i class="fab fa-reddit-alien fa-5x" style="color: white; padding-top: 30px; padding-left: 28px"></i>
</div>
<h1 class="about-us-text">Mentors</h1>
<div class="about-us-content-container">
<div class="about-us-content-text">
Interested in volunteering to help our hackers the day of the event? Sign up here to be a mentor for Codestellation.
</div>
<div>
<button class="about-us-button" type="button">
<h2>Sign Up</h2>
</button>
</div>
</div>
</div>
</div>
<div class="col-3">
<div>
<div class="circleAboutUs">
<i class="fas fa-space-shuttle fa-rotate-270 fa-5x" style="color: white; padding-right: 27px; padding-top: 14px; padding-bottom: 5px"></i>
</div>
<h1 class="about-us-text">Sponsors</h1>
<div class="about-us-content-container">
<div class="about-us-content-text">
Codestellation can&#8217t take off without our sponsors! Learn more about what perks you&#8217ll recieve and how your partnership
will contribute to the event.
</div>
<div>
<button class="about-us-button" type="button">
<h2>Sponsor</h2>
</button>
</div>
</div>
</div>
</div>
</div>
</div>

text in footer won't align to bottom center

As the title suggests I'm trying to align my text in my footer to be horizontally center and aligned to the bottom.
Having read other's solutions, I've tried to set the parent div to relative, the p element to absolute, and then bottom: 0;/vertical-align: bottom; But doesn't work.
What happens is that the text moves up into the above div and is no longer horizontally centered.
/*Section3*/
#section3 {
height: 50%;
background: #6ed3cf;
text-align: center;
padding: 0 0 0.5em;
height: 20em;
}
#section3 h2 {
font-size: 2em;
font-weight: 200;
}
#section3 i {
padding: 0.5em;
color: black;
}
/*Footer*/
#footer {
background:#fff;
color: black;
height: 10%;
font-family: 'Open Sans', sans-serif;
position: relative;
display: table;
}
#footer p {
font-size: 0.7em;
text-align: center;
position: absolute;
bottom: 0;
vertical-align: bottom;
}
<div id="section3" style="display:flex;justify-content:center;align-items:center;">
<div>
<h2>header</h2>
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<p>blablablablablablablablablablablablablablablablablablablablabla</p>
<i class="fa fa-envelope fa-2x" aria-hidden="true"></i>
<i class="fa fa-linkedin-square fa-2x" aria-hidden="true"></i >
</div>
</div>
</div>
</div>
</div>
<!-- Footer -->
<div id="footer">
<div class="container">
<div class="row">
<div class="col-md-4 col-md-offset-4">
<p>text</p>
</div>
</div>
</div>
</div>
I'm a bit confused about certain properties on your components, but here's what I would do:
Remove position: absolute on your <p> element, and remove the display: table from your <footer>.
Like so:
html {
height: 100%;
box-sizing: border-box;
}
body {
position: relative;
margin: 0;
min-height: 100%;
}
/*Section3*/
#section3 {
height: 50%;
background: #6ed3cf;
text-align: center;
padding: 0 0 0.5em;
height: 20em;
}
#section3 h2 {
font-size: 2em;
font-weight: 200;
}
#section3 i {
padding: 0.5em;
color: black;
}
/*Footer*/
#footer {
background: #fff;
color: black;
height: 10%;
font-family: 'Open Sans', sans-serif;
position: absolute;
width: 100%;
bottom: 0;
}
#footer div {
height: 100%;
}
#footer .row > div {
width: 100%;
display: table;
}
#footer p {
display: table-cell;
font-size: 0.7em;
text-align: center;
bottom: 0;
vertical-align: bottom;
}
<div id="section3" style="display:flex;justify-content:center;align-items:center;">
<div>
<h2>header</h2>
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<p>blablablablablablablablablablablablablablablablablablablablabla</p>
<i class="fa fa-envelope fa-2x" aria-hidden="true"></i>
<i class="fa fa-linkedin-square fa-2x" aria-hidden="true"></i >
</div>
</div>
</div>
</div>
</div>
<!-- Footer -->
<div id="footer">
<div class="container">
<div class="row">
<div class="col-md-4 col-md-offset-4">
<p>text</p>
</div>
</div>
</div>
</div>
It worked for me when i gave width:100%; to my footer property. if you do that then the text aligns itself to middle. PS, my reputation doesnt allow me to add a comment...
Please add width style for P element of #footer as following :
#footer p {
font-size: 0.7em;
text-align: center;
position: absolute;
bottom: 0;
vertical-align: bottom;
width:100%; /* added new style */
}
If you have any issue please let me know.
Thanks...
You just try this.
#footer {
background:#fff;
color: black;
height: 10%;
font-family: 'Open Sans', sans-serif;
position: relative;
display: table;
width: 100%;
text-align: center;
}
This is worked for me.
See if this solve your purpose
#section3 {
height: 50%;
background: #6ed3cf;
text-align: center;
padding: 0 0 0.5em;
height: 20em;
}
#section3 h2 {
font-size: 2em;
font-weight: 200;
}
#section3 i {
padding: 0.5em;
color: black;
}
/*Footer*/
#footer {
/* background: #fff; */
/* color: black; */
/* height: 10%; */
/* font-family: 'Open Sans', sans-serif; */
/* position: relative; */
/* display: table; */
background: #6ed3cf;
}
#footer p {
font-size: 0.7em;
text-align: center;
/* position: absolute; */
/* bottom: 0; */
/* vertical-align: bottom; */
margin-top: 0px;
}
<div id="section3" style="display:flex;justify-content:center;align-items:center;">
<div>
<h2>header</h2>
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<p>blablablablablablablablablablablablablablablablablablablablabla</p>
<i class="fa fa-envelope fa-2x" aria-hidden="true"></i>
<i class="fa fa-linkedin-square fa-2x" aria-hidden="true"></i >
</div>
</div>
</div>
</div>
</div>
<!-- Footer -->
<div id="footer">
<div class="container">
<div class="row">
<div class="col-md-4 col-md-offset-4">
<p>text</p>
</div>
</div>
</div>
</div>

Resizable button with an image

I want to create a button like this one :
but bigger, resizable and to function properly on bootstrap.
Here's what I've done so far:
I've tried with display: inline-block; on download-btn-icon and download-btn-text then I wanted to center the .fa using http://www.smashingmagazine.com/2013/08/09/absolute-horizontal-vertical-centering-css/ but the .fa displays way out of download-btn.
This is the html:
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="download-btn">
<div class="download-btn-icon">
<i class="fa fa-cloud-download fa-3x"></i>
</div>
<div class="download-btn-text">
<h3>Download Client</h3>
<h5>Get the latest full updated client.</h5>
</div>
</div>
</div>
and this is the less:
.download-btn {
width: 100%;
height: 70px;
background-color: #000;
.download-btn-icon {
display: inline-block;
float: left;
width: 25%;
height: 100%;
border-right: 1px solid #fff;
.fa{
padding-top: 14px;
padding-left: 23px;
}
}
.download-btn-text {
display: inline-block;
width: 75%;
float: right;
padding-left: 15px;
}
}
I'm clueless I don't know how to align the divs properly, I need some advice.
You can use display: table-cell and vertical-align: middle to achieve this effect. This solves the alignment issue and forces both elements to have the same height.
h3, h5 {
margin: 0;
line-height: 1.5em;
}
.download-btn-icon,
.download-btn-text {
display: table-cell;
background: #222;
vertical-align: middle;
padding: 7.5px 15px;
color: #999;
}
.download-btn-icon {
border-right: 1px solid #444;
}
<div class="download-btn">
<div class="download-btn-icon">
<i class="fa fa-cloud-download fa-3x"></i>
</div>
<div class="download-btn-text">
<h3>Download Client</h3>
<h5>Get the latest full updated client.</h5>
</div>
</div>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">

HTML, CSS: Append inline-element to the right of a centered inline-element

(The title might sound stupid but I don't know how to put it more sophisticated.)
As you can see in the follwing screenshots, I have 3 stacked divs.
<div class="col-xs-3">
<div class="center-horizontal-inline">
<a class="upvote" href="#" data-id="iZheLNnewWtMhPTQd">
</div>
<div class="score">
115
<span class="badge score-diff vertical-align"> +5 </span>
</div>
<div class="center-horizontal-inline">
</div>
The one in the middle contains the number (115). The other two the vote-arrows. For the one containing the number, I want to add a "badge" (in bootstrap context) right next to the number, let's say to the right. You can see my attempt shining through the colored overlay.
The goal is to leave the number centered respectively to the arrow-icons, while placing the badge with an offset (or "right next to") respectively to the number.
My attempt was to set a float: right; for the badge, but as you can see, the number has an offset now. When I try position: absolute; on the badge, there is no offset (as wanted), but I can't get the badge right next to the number, I can only attach it to the right border because I don't have the number as positioning-reference anymore.
Hope my explanation was clear enough. I also didn't know how to search for that problem...
EDIT 1:
As I want it to look like (positioning-wise):
Here we go, using relative and absolute positions together:
DEMO: http://jsfiddle.net/1qbo7uwn/
HTML
<div class="score">
<span class="score-wrap">
<span class="score-main">123</span>
<span class="score-diff">8</span>
</span>
</div>
CSS
.score {
width: 80px;
border: 2px solid blue;
padding: 10px 0;
text-align: center;
}
.score-wrap {
display: inline-block;
position: relative;
}
.score-main {
border: 2px solid green;
}
.score-diff {
position: absolute;
border: 2px solid red;
left: 100%;
top: -2px;
}
Added some span tags in the HTML.
EDIT: vertical align of everything, by setting line height.
http://jsfiddle.net/1qbo7uwn/1/
As you said you are okay with HTML modification. Here's my attempt:
Demo Fiddle
HTML
<div class="wrap">
<div class="vote up">
<i class="fa fa-angle-up"></i>
</div>
<div class="stat">
<span class="score">115
<span class="badge">+5</span>
</span>
</div>
<div class="vote inactive">
<i class="fa fa-angle-down"></i>
</div>
</div>
CSS
.wrap{
margin: 100px;
text-align:center;
}
.vote{
font-size:36px;
}
.up{
color:green;
}
.down{
color:red;
}
.inactive{
color:gray;
}
.score{
position: relative;
display:block;
padding: 5px 0;
}
.badge{
background: #eee;
padding:5px 10px;
border-radius: 30px;
position: absolute;
top:0;
margin-left:10px;
}
Try
Demo: http://jsfiddle.net/tamilcselvan/rjv1xxo2/1/
.center-horizontal-inline {
font-size: 2em;
text-align: center;
}
.score {
text-align: center;
}
.score:after {
content:attr(data-badge);
position: absolute;
margin-left: .4em;
font-size: x-small;
min-width: 10px;
padding: 3px 7px;
font-size: 12px;
font-weight: 700;
line-height: 1;
color: #FFF;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
background-color: #777;
border-radius: 10px;
}
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"/>
<div class="col-xs-3">
<div class="center-horizontal-inline vote"> <i class="glyphicon glyphicon-chevron-up"></i>
</div>
<div class="score" data-badge="+5">115</div>
<div class="center-horizontal-inline"> <i class="glyphicon glyphicon-chevron-down"></i>
</div>
</div>