I can't get my fa icon to line up left to my h3 title

nas - i can
chronixx i can
i can 's
i can't
i can do it
i can program
i can book
i can only imagine

I've tried a couple of tricks I found online here, but I can't get it to line up without losing my formatting, size, position color. etc. I want it all text and images to be centered. I can't figure it out.

This is my current code and CSS:

PIPE THREADING When it comes to pipe threading we have your back. We use the best technology to ensure accurate and precise threading.

here is my css

.demo {
  padding: 100px 0;
}

.heading-title {
  margin-bottom: 100px;
}

.serviceBox {
  padding: 30px 30px 30px 90px;
  background: #f8f8f8;
  color: #333;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease-in-out 0s;
}

.serviceBox:hover {
  background: #645e9d;
  color: #fff;
}

.serviceBox:after {
  content: "";
  display: block;
  border-top: 500px solid #fff;
  border-left: 500px solid transparent;
  margin-top: -55%;
  margin-left: 100%;
  opacity: 0;
  position: absolute;
  transform: scale(2);
  transition: all 0.3s ease-in-out 0s;
}

.serviceBox:hover:after {
  margin-left: 0;
  opacity: 0.1;
}

.serviceBox .service-icon {
  font-size: 50px;
  color: #645e9d;
  position: absolute;
  top: 40px;
  left: 20px;
  transition: all 0.3s ease-in-out 0s;
}

.serviceBox:hover .service-icon {
  color: #fff;
}

.serviceBox .title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px 0;
  text-transform: capitalize;
}

.serviceBox .description {
  font-size: 15px;
  color: #a3a3a3;
  line-height: 25px;
  margin: 0;
  transition: all 0.3s ease-in-out 0s;
}

.serviceBox:hover .description {
  color: #fff;
}

@media only screen and (max-width: 990px) {
  .serviceBox {
    margin-bottom: 15px;
  }
}
<html lang="en">

<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
  <!-- Optional theme -->
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
</head>

<body>

  <div class="demo">
    <div class="container">
      <div class="row">

        <div class="col-md-4 col-sm-6">
          <div class="serviceBox">
            <div class="service-icon"><i class="icon fa fa-check-square-o" aria-hidden="true"></i></div>
            <h3 class="title">PIPE THREADING</h3>
            <p class="description">When it comes to pipe threading we have your back. We use the best technology to ensure accurate and precise threading.</p>
            <img class="rounded mx-auto d-block" src="wp-content/uploads/2019/03/pipethreading.jpg" alt="..." />
          </div>
        </div>
      </div>
    </div>
  </div>

</body>

</html>

You could include the h3 title into the fa div. As an example: https://jsfiddle.net/quyovr9a/

.demo
{
	padding: 100px 0;
}

.title {
	display: inline-block;
}

.description {
	padding-top: 90px;
}

.heading-title
{
	margin-bottom: 100px;
}
.serviceBox{
    padding: 30px 30px 30px 90px;
    background: #f8f8f8;
    color: #333;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease-in-out 0s;
}

.serviceBox:hover{
    background: #645e9d;
    color: #fff;
}

.serviceBox:after{
    content: "";
    display: block;
    border-top: 500px solid #fff;
    border-left: 500px solid transparent;
    margin-top: -55%;
    margin-left: 100%;
    opacity: 0;
    position: absolute;
    transform: scale(2);
    transition: all 0.3s ease-in-out 0s;
}

.serviceBox:hover:after{
    margin-left: 0;
    opacity: 0.1;
}

.serviceBox .service-icon{
    font-size: 50px;
    color: #645e9d;
    position: absolute;
    top: 40px;
    left: 20px;
    transition:all 0.3s ease-in-out 0s;
}

.serviceBox:hover .service-icon{
    color: #fff;
}

.serviceBox .title{
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px 0;
    text-transform: capitalize;
}

.serviceBox .description {
    font-size: 15px;
    color: #a3a3a3;
    line-height: 25px;
    margin: 0;
    margin-left: -8px;
    transition: all 0.3s ease-in-out 0s;
}

.serviceBox .rounded_mx-auto_d-block {
    margin-left: -6px;
}

.serviceBox:hover .description{
    color: #fff;
}

@media only screen and (max-width: 990px){
    .serviceBox{ margin-bottom: 15px; }
}
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
</head>
<body>

<div class="demo">
<div class="container">
<div class="row">

<div class="col-md-4 col-sm-6">
<div class="serviceBox">
<div class="service-icon"><i class="icon fa fa-check-square-o" aria-hidden="true"></i> <h3 class="title">PIPE THREADING</h3></div>
<p class="description">When it comes to pipe threading we have your back. We use the best technology to ensure accurate and precise threading.</p>
<img class="rounded_mx-auto_d-block" src="wp-content/uploads/2019/03/pipethreading.jpg" alt="..." />
</div>
</div>
</div>
</div>
</div>

</body>
</html>

Informed Consent Action Network: Home, Plan for college & find financial aid with Iowa College Access Network. Find money for college & get financial aid! Informed Consent Action Network ICAN is a non profit organization focused on the scientific integrity of vaccines and pharmaceutical Industry.

Added a col-center class that can be applied to your column to center the box properly.

.col-center {
  float: none !important;
  margin: auto;
}

.demo
{
	padding: 100px 0;
}
.heading-title
{
	margin-bottom: 100px;
}
.serviceBox{
    padding: 30px 30px 30px 90px;
    background: #f8f8f8;
    color: #333;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease-in-out 0s;
}

.serviceBox:hover{
    background: #645e9d;
    color: #fff;
}

.serviceBox:after{
    content: "";
    display: block;
    border-top: 500px solid #fff;
    border-left: 500px solid transparent;
    margin-top: -55%;
    margin-left: 100%;
    opacity: 0;
    position: absolute;
    transform: scale(2);
    transition: all 0.3s ease-in-out 0s;
}

.serviceBox:hover:after{
    margin-left: 0;
    opacity: 0.1;
}

.serviceBox .service-icon{
    font-size: 50px;
    color: #645e9d;
    position: absolute;
    top: 40px;
    left: 20px;
    transition:all 0.3s ease-in-out 0s;
}

.serviceBox:hover .service-icon{
    color: #fff;
}

.serviceBox .title{
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px 0;
    text-transform: capitalize;
}

.serviceBox .description{
    font-size: 15px;
    color: #a3a3a3;
    line-height: 25px;
    margin: 0;
    transition: all 0.3s ease-in-out 0s;
}

.serviceBox:hover .description{
    color: #fff;
}

@media only screen and (max-width: 990px){
    .serviceBox{ margin-bottom: 15px; }
}


.col-center {
  float: none !important;
  margin: auto;
}
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
</head>
<body>

<div class="demo">
<div class="container">
<div class="row">

<div class="col-md-4 col-sm-6 col-center">
<div class="serviceBox">
<div class="service-icon"><i class="icon fa fa-check-square-o" aria-hidden="true"></i></div>
<h3 class="title">PIPE THREADING</h3>
<p class="description">When it comes to pipe threading we have your back. We use the best technology to ensure accurate and precise threading.</p>
<img class="rounded mx-auto d-block" src="wp-content/uploads/2019/03/pipethreading.jpg" alt="..." />
</div>
</div>
</div>
</div>
</div>

</body>
</html>

I Can (Nas song), Trump: 'I can't say one way or the other' whether John Lewis was impressive. “He chose not to come to my inauguration,” the president said of� 50+ videos Play all Mix - Chronixx - "I Can" (Official Music Video) YouTube Dre Island - We Pray ft. Popcaan (Official Video) - Duration: 4:07. Popcaan 28,630,600 views

You can use flexbox to achieve this.

You need to do some wrapping, remove your positioning on the icon, change flex-direction on the right column, etc...

.serviceBox {
  display:flex;
}


.box-left {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.box-right {
    display: flex;
    flex-direction:column;
    justify-content: center;
    align-items: flex-start;
    flex: 3;
}

Fiddle: https://jsfiddle.net/srtk05mx/12/

Iowa College Access Network | ICAN, The UN has cautioned that the high rate of unemployment among young adults could mean "a lot of young people are going to be left behind". I☆Can is the story of a girl (Miyu) who is just starting out as an idol. Her manager (Ryouta) is also her high-school sweetheart. They are in a slowly progressing, supportive relationship, when Miyu's producer (Terada) decides he wants a piece of her.

International Campaign to Abolish Nuclear Weapons: ICAN, Because payment errors can happen in different steps of the payment process and be caused by a number of reasons, they're often difficult It has been about 3 and ½ years since Noah received his diagnosis. He is now 7 years old, and is in 1st grade at the local public school. He had initially received services through the public school system, but since earlier this year, he did not meet the criteria for those services.

Trump: 'I can't say one way or the other' whether John Lewis was , “I can't keep doing this.” I hear that over and over from my friends with kids. Holding a job, parenting, and teaching all at once during the� The I CAN Enquiry Service continues to operate on Mondays to Wednesdays between 9.30 - 12.30 and 1.30 - 4.30. Please leave voicemail if you cannot get through and we will endeavour to call you back during opening hours. To have a chat with an I CAN speech and language therapist, call 020 7843 2544

Coronavirus economy: 'I'm just looking for whatever I can get', Contact us to get started on the journey. We are committed to the best hope and future for your child and family. We have the the essential services you need.

Comments
  • Vertically centered, horizontally centered, or both?
  • Horizontally centered
  • Hi Tried adding it in the div tag. it doesn't work for me.
  • Hmm... If you run the code snippet below my answer, it seems to work. Is this what you want to achive?
  • it is what i want to achieve but for some reason its not working when I implement it
  • Difficult to say what's going wrong since I don't know the complete code. The fiddle to my answer gives the same result as the code snippet, so it should ‘work‘ in principle.
  • Thank you. It does work in the fiddle and in principle it is the right answer. I believe there is some css issue with the theme. Thanks again for the help Since it was an issue on smaller screens i opted to hide the icon on smaller screens entirely. thanks again.