Question: i put to div with two different content in a parent div and i want set vertical align first div with second div

sorry for bad language

```css
.title-pin {
  position: relative;
}
.pin-icon {
  position: absolute;
  width: 50px;
  height: 50px;
  -webkit-border-radius: 25px;
  -moz-border-radius: 25px;
  border-radius: 25px;
  text-align: center;
  background-color: #333;
  color: #fff;
}
.star {
  font-size: 30px;
  line-height: 50px;
}
.title-container {
  padding-left: 60px;
  width: 400px;
  font-size: 24px;
}
```

```html
<div class="title-pin">
  <div class="pin-icon">
    <span class="star">★</span>
  </div>
  <div class="title-container">
    <h3>This title is unstable. This title is unstable. This title is unstable.`enter code here`</h3>
  </div>
</div>
```

Answer: 
Many ways you can get this. In short I just add one line on your css class .pin-icon **top: 25%** 

```css
.title-pin {
    position:relative;
}
.pin-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    -webkit-border-radius: 25px;
    -moz-border-radius: 25px;
    border-radius: 25px;
    text-align: center;
    background-color:#333;
    color:#fff;
    top:25%;

}
.star {
    font-size: 30px;
    line-height: 50px;
}
.title-container {
    padding-left: 60px;
    width:400px;
    font-size:24px;
}

```

```html
<div class="title-pin">
  <div class="pin-icon">
    <span class="star">★</span>
  </div>
  <div class="title-container">
    <h3>This title is unstable. This title is unstable. This title is unstable.`enter code here`</h3>
  </div>
</div>
```
as long as the element has a `height`, this will center the element vertically.

```
position: absolute;
top: 0;
bottom: 0;
margin: auto;

```

```css
.title-pin {
  position: relative;
}
.pin-icon {
  position: absolute;
  width: 50px;
  height: 50px;
  -webkit-border-radius: 25px;
  -moz-border-radius: 25px;
  border-radius: 25px;
  text-align: center;
  background-color: #333;
  color: #fff;
  top: 0;
  bottom: 0;
  margin: auto;
}
.star {
  font-size: 30px;
  line-height: 50px;
}
.title-container {
  padding-left: 60px;
  width: 400px;
  font-size: 24px;
}
```

```html
<div class="title-pin">
  <div class="pin-icon">
    <span class="star">★</span>
  </div>
  <div class="title-container">
    <h3>This title is unstable. This title is unstable. This title is unstable.`enter code here`</h3>
  </div>
</div>
```