element does not center horizontally and icons do not appear (css) - html

I cannot find out why text1 does not center horizontally and why the icons do not appear (I have only a black point instead of blue icon and
circle).
<div id="texte_services">
text1
</div>
<div class="flex-container">
<div class="row">
<div class="column">
<p class="contenu">
<img src="../Images/screen.png" alt="screen">
</p>
</div>
</div>
<table>
<tr>
<td>
<div class="bullet">
</div>
<span class="blueText"><i class="fa fa-line-chart fa-lg"></i>
</span>
<span class="bluePoint">•
</span>
<span class="titleText">
</span>
</td>
<td>
<h3>UX design
</h3>
<p>text2
</p>
</td>
</tr>
<tr>
<td>
<div class="bullet">
</div>
<span class="blueText"><i class="fa fa-line-chart fa-lg"></i>
</span>
<span class="bluePoint">•
</span>
<span class="titleText">
</span>
</td>
<td>
<h3>UX design
</h3>
<p>text2
</p>
</td>
</tr>
<tr>
<td>
<div class="bullet">
</div>
<span class="blueText"><i class="fa fa-line-chart fa-lg"></i>
</span>
<span class="bluePoint">•
</span>
<span class="titleText">
</span>
</td>
<td>
<h3>UX design
</h3>
<p>text2
</p>
</td>
</tr>
</table>
</div>
CSS
#texte_services
{
display: flex;
flex-direction: row;
justify-content: center;
text-align: center;
}
article
{
margin-right: 20px;
flex: 3;
}
.ico_categorie
{
vertical-align: middle;
margin-right: 8px;
}
h3, p
{
margin: 20px;
}
#flex-container {
display: flex;
justify-content: center;
margin-top: -20px;
margin-bottom: 15px;
}

The reason is because you didnt include the link to font-awesome.min.css I just added it and everything works fine.
#texte_services
{
display: flex;
flex-direction: row;
justify-content: center;
text-align: center;
}
article
{
margin-right: 20px;
flex: 3;
}
.ico_categorie
{
vertical-align: middle;
margin-right: 8px;
}
h3, p
{
margin: 20px;
}
#flex-container {
display: flex;
justify-content: center;
margin-top: -20px;
margin-bottom: 15px;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div id="texte_services">
text1
</div>
<div class="flex-container">
<div class="row">
<div class="column">
<p class="contenu">
<img src="../Images/screen.png" alt="screen">
</p>
</div>
</div>
<table>
<tr>
<td>
<div class="bullet">
</div>
<span class="blueText"><i class="fa fa-line-chart fa-lg"></i>
</span>
<span class="bluePoint">•
</span>
<span class="titleText">
</span>
</td>
<td>
<h3>UX design
</h3>
<p>text2
</p>
</td>
</tr>
<tr>
<td>
<div class="bullet">
</div>
<span class="blueText"><i class="fa fa-line-chart fa-lg"></i>
</span>
<span class="bluePoint">•
</span>
<span class="titleText">
</span>
</td>
<td>
<h3>UX design
</h3>
<p>text2
</p>
</td>
</tr>
<tr>
<td>
<div class="bullet">
</div>
<span class="blueText"><i class="fa fa-line-chart fa-lg"></i>
</span>
<span class="bluePoint">•
</span>
<span class="titleText">
</span>
</td>
<td>
<h3>UX design
</h3>
<p>text2
</p>
</td>
</tr>
</table>
</div>

Related

How to display items aligned?

this is for sure a common question but text-align and display properties are not solving it, so i must have some mistake.
What should i do to display the 3 items in the same horizontal line?
.contact__information {
vertical-align: middle;
margin-bottom: var(--mb-1);
padding-right: var(--mb-.75);
align-items: right;
text-align: center;
display: inline-flex;
margin-left: auto;
margin-right: auto;
}
<section class="contact section" id="contact">
<h2 class="section__title">Contacte</h2>
<span class="section__subtitle">Contacte para mais informações</span>
<div class="contact__information">
<i class="uil uil-phone contact__icon"></i>
<div>
<h3 class="contact__title">Telemóvel</h3>
<span class="contact__subtitle">999-777-666</span>
</div>
</div>
<div class="contact__information">
<i class="uil uil-envelope contact__icon"></i>
<div>
<h3 class="contact__title">Email</h3>
<span class="contact__subtitle">email.com</span>
</div>
</div>
<div class="contact__information">
<i class="uil uil-map-marker contact__icon"></i>
<div>
<h3 class="contact__title">Morada</h3>
<span class="contact__subtitle">Portugal</span>
</div>
</div>
</section>
Step 1: Define width
Step 2: Locate parent to flex - #contact
Step 3: align-items: center; makes all elements inline (aligned)
Step 4: justify-content: space-evenly; spaces all elements evenly. Using up extra space.
#contact {
width: 100%;
display: flex;
align-items: center;
justify-content: space-evenly;
}
<section class="contact section" id="contact">
<h2 class="section__title">Contacte</h2>
<span class="section__subtitle">Contacte para mais informações</span>
<div class="contact__information">
<i class="uil uil-phone contact__icon"></i>
<div>
<h3 class="contact__title">Telemóvel</h3>
<span class="contact__subtitle">999-777-666</span>
</div>
</div>
<div class="contact__information">
<i class="uil uil-envelope contact__icon"></i>
<div>
<h3 class="contact__title">Email</h3>
<span class="contact__subtitle">email.com</span>
</div>
</div>
<div class="contact__information">
<i class="uil uil-map-marker contact__icon"></i>
<div>
<h3 class="contact__title">Morada</h3>
<span class="contact__subtitle">Portugal</span>
</div>
</div>
</section>
Feels like an opportunity for flex. I added borders and padding just to make it obvious what was where and did some alignment you can customize as needed
.contact.section {
display: flex;
flex-direction: row;/* or column if you want the first two on top */
justify-content: flex-start;
align-items: center;
}
.contact__information,
.contact__information div { /*probably need a class for the div */
display: flex;
flex-direction: row;
justify-content: center;
border: solid 1px lime;
padding:0.25rem;
}
.contact__information div {
display: flex;
flex-direction: column;/* or row if titles are in line with data */
border: solid 1px pink;
}
.contact__title {
border: solid blue 1px;
padding: 0.5rem;
align-self: center;
}
.contact__subtitle {
border: solid #8d8dff 1px;
padding: 0.5rem;
align-self: center;
}
<section class="contact section" id="contact">
<h2 class="section__title">Contacte</h2>
<span class="section__subtitle">Contacte para mais informações</span>
<div class="contact__information">
<i class="uil uil-phone contact__icon"></i>
<div>
<h3 class="contact__title">Telemóvel</h3>
<span class="contact__subtitle">999-777-666</span>
</div>
</div>
<div class="contact__information">
<i class="uil uil-envelope contact__icon"></i>
<div>
<h3 class="contact__title">Email</h3>
<span class="contact__subtitle">email.com</span>
</div>
</div>
<div class="contact__information">
<i class="uil uil-map-marker contact__icon"></i>
<div>
<h3 class="contact__title">Morada</h3>
<span class="contact__subtitle">Portugal</span>
</div>
</div>
</section>

Align Spans using Bootstrap

I am working on a webpage that displays the users' personal information, and I would like to align vertically the spans colored in red using Bootstrap.
The following is a screenshot of my form:
and here is the HTML/CSS code I am using:
HTML
<table class="table">
<tbody>
<div class="col-sm-6 test">
<span class=""><strong >First Name: </strong></span>
<span class="" style="color:red" >FirstName</span>
</div>
<div class="col-sm-6 test">
<strong class="">Age: </strong>
<span class="" style="color:red">Age</span>
</div>
<div class="col-sm-6 test">
<strong class="">Last Name: </strong>
<span class="" style="color:red">LastName</span>
</div>
<div class="col-sm-6 test" >
<strong class="">Status: </strong>
<span class="" style="color:red">Status</span>
</div>
</tbody>
</table>
CSS
.test{
border-top: 1px solid #e2eae9; vertical-align: middle; padding: 6px 8px;
}
You can try using display table-row and display table-cell
Result: jsfiddle
.test{
border-top: 1px solid #e2eae9; vertical-align: middle; padding: 6px 8px;
display: table-row;
}
Result: jsfiddle
.test span{
display: table-cell;
}
Alternatively using bootstrap, you can make your test div as rows and your span as columns:
<div class="row test">
<span class="col-sm-6"><strong >First Name: </strong></span>
<span class="col-sm-6" style="color:red" >FirstName</span>
</div>
If you mean to stack the red text under the "labels" then you could do something like this:
<table class="table">
<tbody>
<div class="col-sm-6 test">
<span class="col-sm-12"><strong >First Name: </strong></span>
<span class="col-sm-12" style="color:red" >FirstName</span>
</div>
<div class="col-sm-6 test">
<strong class="col-sm-12">Age: </strong>
<span class="col-sm-12" style="color:red">Age</span>
</div>
<div class="col-sm-6 test">
<strong class="col-sm-12">Last Name: </strong>
<span class="col-sm-12" style="color:red">LastName</span>
</div>
<div class="col-sm-6 test" >
<strong class="col-sm-12">Status: </strong>
<span class="col-sm-12" style="color:red">Status</span>
</div>
</tbody>
</table>

Replacing Display flex (not working for IE) from html element without affecting the output result

Having the following html, I want to remove display flex whithout affecting the output result. display:flex is NOT working on Internet Explorer. Keep in mind that I can't change the structure of the html elements. I can only add stylesheet.
<table id="TabsTable" width="100%" style="overflow: hidden !important;" cellpadding="0" cellspacing="1">
<tbody>
<tr>
<td class="vdcTabs" style="width: 100%;">
<span id="Tab_dlTabs" style="display: flex;">
<span>
<div class="ActiveTab">
<a id="lnktab1">Tab1</a>
</div>
</span>
<span>
<div class="VdcTab">
<a id="lnktab2" style="">Tab2</a>
</div>
</span>
<span>
<div class="VdcTab">
<a id="lnktab3" style="">Tab3</a>
</div>
</span>
<span>
<div class="VdcTab">
<a id="lnktab4" style="">Tab4</a>
</div>
</span>
<span>
<div class="VdcTab">
<a id="lnktab5" style="">Tab5</a>
</div>
</span>
</span>
</td>
</tr>
</tbody>
</table>
Use display:table to #Tab_dlTabs and display:table-cell. to #Tab_dlTabs > span
It works in all browser.
#Tab_dlTabs > span {
display: table-cell;
}
<table id="TabsTable" width="100%" style="overflow: hidden !important;" cellpadding="0" cellspacing="1">
<tbody>
<tr>
<td class="vdcTabs" style="width: 100%;">
<span id="Tab_dlTabs" style="display: table;">
<span>
<div class="ActiveTab">
<a id="lnktab1">Tab1</a>
</div>
</span>
<span>
<div class="VdcTab">
<a id="lnktab2" style="">Tab2</a>
</div>
</span>
<span>
<div class="VdcTab">
<a id="lnktab3" style="">Tab3</a>
</div>
</span>
<span>
<div class="VdcTab">
<a id="lnktab4" style="">Tab4</a>
</div>
</span>
<span>
<div class="VdcTab">
<a id="lnktab5" style="">Tab5</a>
</div>
</span>
</span>
</td>
</tr>
</tbody>
</table>
Note: If you can don't apply inline css.
Is this what you want!?
Works in every Browser and is as close as you can get to flex
#Tab_dlTabs > span {
float: left;
}
<table id="TabsTable" width="100%" style="overflow: hidden !important;" cellpadding="0" cellspacing="1">
<tbody>
<tr>
<td class="vdcTabs" style="width: 100%;">
<span id="Tab_dlTabs" style="">
<span>
<div class="ActiveTab">
<a id="lnktab1">Tab1</a>
</div>
</span>
<span>
<div class="VdcTab">
<a id="lnktab2" style="">Tab2</a>
</div>
</span>
<span>
<div class="VdcTab">
<a id="lnktab3" style="">Tab3</a>
</div>
</span>
<span>
<div class="VdcTab">
<a id="lnktab4" style="">Tab4</a>
</div>
</span>
<span>
<div class="VdcTab">
<a id="lnktab5" style="">Tab5</a>
</div>
</span>
</span>
</td>
</tr>
</tbody>
</table>

Positioning divs like table cells and rows

I am trying to make a little game to learn some javascript.
Ok, so I was using untill now a table for my content (image):
Now, what I am trying to do, is to use divs instead of table. But I want to position them to look similar to the image above.
This is what i have now:
My code for the Lemonade stand div (its similar for the others):
<div style="background: url(images/texture.png); display: table; margin-left: auto; margin-right:auto; border: solid black 2px; padding: 10px">
<div style="padding-bottom: 7px"><b><center>Lemonade stand</center></b></div>
<div style="padding-bottom: 7px"><center><button id="countButton" style="padding: 2px;"><img src="images/lemonade.png" width="50px" height="50px" style="padding: 2px"></button></center></div>
<div><b><font color="brown">Level:</font></b> <span id="displayLevel"> 1 </span> <img src="images/plus.png" id="buyLevel" width="20px" height="18px"></div>
<div><b><font color="green">Production:</font></b> <span id="production"> 1 </span> $ </div>
<div> <font style="font-size: 15px">(Prod. per click) </font> </div>
<div><b><font color="red">Level price:</font></b> <span id="pretlevel"> 0 </span> $ </div>
</div>
I am beginner, trying to learn. Thanks!
div will like as table if you add next styles:
display:table; to div table-analog
display:table-row; to div tr-analog
display:table-cell; to div td-analog;
<div style="display: table;">
<div style="display: table-row;">
<div style="background: url(images/texture.png); display: table-cell; margin-left: auto; margin-right:auto; border: solid black 2px; padding: 10px">
<div style="padding-bottom: 7px"><b><center>Lemonade stand</center></b></div>
<div style="padding-bottom: 7px"><center><button id="countButton" style="padding: 2px;"><img src="images/lemonade.png" width="50px" height="50px" style="padding: 2px"></button></center></div>
<div><b><font color="brown">Level:</font></b> <span id="displayLevel"> 1 </span> <img src="images/plus.png" id="buyLevel" width="20px" height="18px"></div>
<div><b><font color="green">Production:</font></b> <span id="production"> 1 </span> $ </div>
<div> <font style="font-size: 15px">(Prod. per click) </font> </div>
<div><b><font color="red">Level price:</font></b> <span id="pretlevel"> 0 </span> $ </div>
</div>
<div style="background: url(images/texture.png); display: table-cell; margin-left: auto; margin-right:auto; border: solid black 2px; padding: 10px">
<div style="padding-bottom: 7px"><b><center>Lemonade stand</center></b></div>
<div style="padding-bottom: 7px"><center><button id="countButton" style="padding: 2px;"><img src="images/lemonade.png" width="50px" height="50px" style="padding: 2px"></button></center></div>
<div><b><font color="brown">Level:</font></b> <span id="displayLevel"> 1 </span> <img src="images/plus.png" id="buyLevel" width="20px" height="18px"></div>
<div><b><font color="green">Production:</font></b> <span id="production"> 1 </span> $ </div>
<div> <font style="font-size: 15px">(Prod. per click) </font> </div>
<div><b><font color="red">Level price:</font></b> <span id="pretlevel"> 0 </span> $ </div>
</div>
DEMO http://jsfiddle.net/o7jarr8n/
HTML
<div class="row">
<div class="box">1</div>
<div class="box">2</div>
</div>
<div class="row">
<div class="box">3</div>
<div class="box">4</div>
</div>
CSS
.row {
margin: 0 auto;
text-align:center;
display:block; // change line
}
.box {
display:inline-block; // same line
background:red;
width:100px;
height:50px;
margin:5px;
}
inline-block, will make div next to each other
Well, you have different options here.
You can use inline-block as display.
You can use float: left with width: 40% for example.
So, for diversity here it is with floated divs.
Also, notice I've placed the css as an external thing so you can have a good base to really learn how to do things.
I've used class selectors, and if you don't know what it is I advice you to look for them. They are the basic of CSS.
.item {
background: url(images/texture.png);
border: solid black 2px;
padding: 10px;
width: 40%;
float: left;
}
.line {
padding-bottom: 7px;
}
.item-container {
max-width: 300px;
}
<div class="item-container">
<div class="item">
<div class="line">
<b>Lemonade stand</b>
</div>
<div class="line">
<button id="countButton" style="padding: 2px;">
<img src="images/lemonade.png" width="50px" height="50px" style="padding: 2px">
</button>
</div>
<div><b>Level:</b><span id="displayLevel"> 1 </span>
<img src="images/plus.png" id="buyLevel" width="20px" height="18px">
</div>
<div><b>Production:</b><span id="production"> 1 </span> $</div>
<div>(Prod. per click)
</div>
<div><b>Level price:</b><span id="pretlevel"> 0 </span> $</div>
</div>
<div class="item">
<div class="line">
<b>Lemonade stand</b>
</div>
<div class="line">
<button id="countButton" style="padding: 2px;">
<img src="images/lemonade.png" width="50px" height="50px" style="padding: 2px">
</button>
</div>
<div><b>Level:</b><span id="displayLevel"> 1 </span>
<img src="images/plus.png" id="buyLevel" width="20px" height="18px">
</div>
<div><b>Production:</b><span id="production"> 1 </span> $</div>
<div>(Prod. per click)
</div>
<div><b>Level price:</b><span id="pretlevel"> 0 </span> $</div>
</div>
</div>
And I've placed both item inside item-container and you can manipulate the width of the parent to achieve a grid system if you desire.
Just a quick note also, if you use float look what is a clearfix. What is a clearfix?
Or using table, table-row, table-cell for display divs
div container isn't centered vertically, only horizontally... You can use, for example, margin:100px auto; ....
JSFiddle example (not centered vertically :( )
You can use either display: table (which has some browser compatibility issues) and display: inline-block (which I preffer):
<div style="background: url(images/texture.png);display:inline-block;width:45%; margin-left: auto; margin-right:auto; border: solid black 2px; padding: 10px">
<div style="padding-bottom: 7px"><b><center>Lemonade stand</center></b></div>
<div style="padding-bottom: 7px"><center><button id="countButton" style="padding: 2px;"><img src="images/lemonade.png" width="50px" height="50px" style="padding: 2px"></button></center></div>
<div><b><font color="brown">Level:</font></b></td> <td> <span id="displayLevel"> 1 </span> <img src="images/plus.png" id="buyLevel" width="20px" height="18px"></div>
<div><b><font color="green">Production:</font></b> </td> <td> <span id="production"> 1 </span> $ </div>
<div> <font style="font-size: 15px">(Prod. per click) </font> </div>
<div><b><font color="red">Level price:</font></b> </td> <td> <span id="pretlevel"> 0 </span> $ </div>
</div><div style="background: url(images/texture.png);display:inline-block;width:45%; margin-left: auto; margin-right:auto; border: solid black 2px; padding: 10px">
<div style="padding-bottom: 7px"><b><center>Restaurant</center></b></div>
<div style="padding-bottom: 7px"><center><button id="countButton" style="padding: 2px;"><img src="images/lemonade.png" width="50px" height="50px" style="padding: 2px"></button></center></div>
<div><b><font color="brown">Level:</font></b></td> <td> <span id="displayLevel"> 1 </span> <img src="images/plus.png" id="buyLevel" width="20px" height="18px"></div>
<div><b><font color="green">Production:</font></b> </td> <td> <span id="production"> 1 </span> $ </div>
<div> <font style="font-size: 15px">(Prod. per click) </font> </div>
<div><b><font color="red">Level price:</font></b> </td> <td> <span id="pretlevel"> 0 </span> $ </div>
</div>
.bloc {
background: url(images/texture.png);
display: inline-block;
margin-left: auto;
margin-right:auto;
border: solid black 2px;
padding: 10px
}
.bloc-title {
padding-bottom: 7px;
font-weight : bold;
text-align : center;
}
.bouton-count {
padding: 2px;
}
.bloc-main-image {
padding: 2px;
width : 50px;
height : 50px;
}
.bloc-level-name {
font-weight : bold;
color : brown;
}
.bloc-image-plus {
width : 20px;
height : 18px;
}
.bloc-production {
font-weight : bold;
color : green;
}
.bloc-prod-per-click {
font-size : 15px;
}
.bloc-level-price {
color : red;
font-weight : bold;
}
.custom-table {
display : table;
width : 100%;
}
.custom-cell {
display : table-cell;
vertical-align : middle;
}
.custom-cell-right {
text-align : right;
]
<div class="custom-table">
<div class="custom-cell custom-cell-right">
<div class="bloc">
<div class="bloc-title">
Lemonade stand
</div>
<div class="bloc-title">
<button id="countButton" class="bouton-count">
<img src="images/lemonade.png" class="bloc-main-image">
</button>
</div>
<div>
<span class="bloc-level-name">Level:</span>
<span id="displayLevel">1</span>
<img src="images/plus.png" id="buyLevel" class="bloc-image-plus">
</div>
<div>
<span class="bloc-production">Production:</span>
<span id="production">1</span>
$
</div>
<div class="bloc-prod-per-click">
(Prod. per click)
</div>
<div>
<span class="bloc-level-price">Level price:</span>
<span id="pretlevel"> 0 </span> $ </div>
</div>
</div>
<div class="custom-cell">
<div class="bloc">
<div class="bloc-title">
Lemonade stand
</div>
<div class="bloc-title">
<button id="countButton" class="bouton-count">
<img src="images/lemonade.png" class="bloc-main-image">
</button>
</div>
<div>
<span class="bloc-level-name">Level:</span>
<span id="displayLevel">1</span>
<img src="images/plus.png" id="buyLevel" class="bloc-image-plus">
</div>
<div>
<span class="bloc-production">Production:</span>
<span id="production">1</span>
$
</div>
<div class="bloc-prod-per-click">
(Prod. per click)
</div>
<div>
<span class="bloc-level-price">Level price:</span>
<span id="pretlevel"> 0 </span> $ </div>
</div>
</div>
</div>
<div class="custom-table">
<div class="custom-cell custom-cell-right">
<div class="bloc">
<div class="bloc-title">
Lemonade stand
</div>
<div class="bloc-title">
<button id="countButton" class="bouton-count">
<img src="images/lemonade.png" class="bloc-main-image">
</button>
</div>
<div>
<span class="bloc-level-name">Level:</span>
<span id="displayLevel">1</span>
<img src="images/plus.png" id="buyLevel" class="bloc-image-plus">
</div>
<div>
<span class="bloc-production">Production:</span>
<span id="production">1</span>
$
</div>
<div class="bloc-prod-per-click">
(Prod. per click)
</div>
<div>
<span class="bloc-level-price">Level price:</span>
<span id="pretlevel"> 0 </span> $ </div>
</div>
</div>
<div class="custom-cell">
<div class="bloc">
<div class="bloc-title">
Lemonade stand
</div>
<div class="bloc-title">
<button id="countButton" class="bouton-count">
<img src="images/lemonade.png" class="bloc-main-image">
</button>
</div>
<div>
<span class="bloc-level-name">Level:</span>
<span id="displayLevel">1</span>
<img src="images/plus.png" id="buyLevel" class="bloc-image-plus">
</div>
<div>
<span class="bloc-production">Production:</span>
<span id="production">1</span>
$
</div>
<div class="bloc-prod-per-click">
(Prod. per click)
</div>
<div>
<span class="bloc-level-price">Level price:</span>
<span id="pretlevel"> 0 </span> $ </div>
</div>
</div>
</div>
I put your css away and I used 2 div container to simulate a table behaviour.
Here I "packed" your bloc in 2 <div>, one with the CSS property display : table which render a table row, and the sub <div> with the property display : table-cell which render a table-cell.

vertically align font awesome icon in td with variable height

I need to vertically align a font-awesome icon in the middle of a td. This td can contain a single or a double line of text, so it has a variable height. I just can't figure out how to align it. I tried everything from line-height over vertical-align to display: inline-table. Nothing worked. Maybe you have an idea.
I'm talking about the fa-tags icon. Here is my code:
HTML:
<table>
<tbody class="row">
<tr class="data">
<td class="date">
<span class="fa fa-tags"></span>
<div class="time">
<time datetime="2015-04-21">21.04.2015</time> -<br>
<time datetime="2015-04-24">24.04.2015</time>
</div>
</td>
<td class="hotel-data">
Hilton Barcelona
<span class="stars">
<span class="fa fa-star"></span>
<span class="fa fa-star"></span>
<span class="fa fa-star"></span>
<span class="fa fa-star"></span>
</span>
</td>
<td class="contract">
Vertrag <span class="fa fa-fw fa-download"></span>
</td>
<td class="invoice">
Rechnungen <span class="fa fa-fw fa-download"></span>
</td>
<td class="details">
Details <span class="fa fa-chevron-right fa-fw"></span>
</td>
</tr>
<tr class="data">
<td class="date">
<span class="fa fa-tags"></span>
<div class="time">
<time datetime="2015-04-21">21.04.2015</time>
</div>
</td>
<td class="hotel-data">
Best Western Alfa Aeropuarto Barcelona
<span class="stars">
<span class="fa fa-star"></span>
<span class="fa fa-star"></span>
<span class="fa fa-star"></span>
<span class="fa fa-star"></span>
</span>
</td>
<td class="contract">
Vertrag <span class="fa fa-fw fa-download"></span>
</td>
<td class="invoice">
Rechnungen <span class="fa fa-fw fa-download"></span>
</td>
<td class="details">
Details <span class="fa fa-chevron-right fa-fw"></span>
</td>
</tr>
</tbody>
</table>
CSS:
td {
padding: 7px 15px;
vertical-align: middle;
min-height: 57px;
}
.date .fa {
color: #999;
font-size: 18px;
margin-right: 5px;
}
.time {
display: inline-block;
font-size: 13px;
color: #d91e17;
}
EXAMPLE BOOTPLY
It looks like you just need to add vertical-align: middle to the .time element. In doing so, the sibling .fa-tags elements will be vertically centered.
Updated Example
.time {
display: inline-block;
vertical-align: middle;
font-size: 13px;
color: #d91e17;
}