Span alignment with css

1

I need to align the 'material-icons' with the text ('span') and the menu icon ('overflow-menu'), all horizontally.

Can anyone help me? I have to do this without changing the html structure.

.container {
  left: 0;
  right: 0;
  margin: 10px auto 10px auto;
  width: 95%;
  border-radius: 4px;
  background: #FFFFFF;
}
.container table {
  width: 100%;
  margin: 0 auto;
}
.container .linha {
  border-top: 1px solid #D7D7D7;
}
.container-head {
  display: table;
  width: 100%;
  color: #FFFFFF;
  border-radius: 4px 4px 0 0;
  height: 65px;
  background: #000;
}
.container-head span {
  background: #000;
}
.container-head .material-icons {
  padding: 20px 0 20px 20px;
  width: 24px;
}
.container-head button {
  margin-top: 12px;
  margin-right: 20px;
  border: 0;
  width: 100px;
  height: 42px;
  cursor: pointer;
  border-radius: 4px;
  color: #FFFFFF;
  float: right;
}
.container-head button .material-icons {
  padding: 0;
  position: absolute;
  margin-top: -12px;
  margin-left: 32px;
}
.container-body {
  padding: 20px;
}
.container-body .notification {
  margin-left: -20px;
  margin-right: -20px;
}
.container-body .tab-content {
  margin-left: -15px;
  margin-right: -15px;
}
.container-body-scroll {
  overflow: auto;
  height: 319px;
  text-align: left;
}
.container-footer {
  border-top: 1px solid #D7D7D7;
  height: 45px;
  padding-left: 10px;
  padding-right: 10px;
}
.container-footer button .material-icons {
  font-size: 16px;
}
.container-footer button {
  margin-top: 7px;
  border: 0;
  padding: 7px;
  cursor: pointer;
  border-radius: 4px;
  color: #FFFFFF;
  float: right;
}
.container-footer .txt {
  float: left;
  margin-top: 12px;
}
<!-- Material Icons (Google) -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

<div class="container">

  <!-- Container Head -->
  <div class="container-head">
    <i class="material-icons text-yellow-2">grade</i>
    <span>TÍTULO CONTAINER</span>

    <!-- Over-Flow Menu -->
    <div class='overflow-menu'>
      <i class="material-icons">more_vert</i>

    </div>
  </div>
  <!-- Container Body -->
  <div class="container-body">
    TEXTO
  </div>
  <!-- Container Footer -->
  <div class="container-footer">
    <div class="txt">
      RODAPÉ
    </div>
  </div>
</div>
    
asked by anonymous 26.12.2016 / 17:02

1 answer

1

.container {
  left: 0;
  right: 0;
  margin: 10px auto 10px auto;
  width: 95%;
  border-radius: 4px;
  background: #FFFFFF;
}
.container table {
  width: 100%;
  margin: 0 auto;
}
.container .linha {
  border-top: 1px solid #D7D7D7;
}
.container-head {
  display: table;
  width: 100%;
  color: #FFFFFF;
  border-radius: 4px 4px 0 0;
  height: 65px;
  background: #000;
  line-height: 65px;
}
.container-head span {
  display: inline-block;
  vertical-align: middle;
  padding: 0px 20px 0px 20px;
}
.container-head .material-icons {
  width: 24px;
  display: inline-block;
  vertical-align: middle;
  padding: 0px 0px 0px 20px;
}
.container-head .overflow-menu {
  float: right;
  vertical-align: middle;
}
.container-head .overflow-menu .material-icons {
  padding-right: 20px;
}
.container-head button {
  margin-top: 12px;
  margin-right: 20px;
  border: 0;
  width: 100px;
  height: 42px;
  cursor: pointer;
  border-radius: 4px;
  color: #FFFFFF;
  float: right;
}
.container-head button .material-icons {
  padding: 0;
  position: absolute;
  margin-top: -12px;
  margin-left: 32px;
}
.container-body {
  padding: 20px;
}
.container-body .notification {
  margin-left: -20px;
  margin-right: -20px;
}
.container-body .tab-content {
  margin-left: -15px;
  margin-right: -15px;
}
.container-body-scroll {
  overflow: auto;
  height: 319px;
  text-align: left;
}
.container-footer {
  border-top: 1px solid #D7D7D7;
  height: 45px;
  padding-left: 10px;
  padding-right: 10px;
}
.container-footer button .material-icons {
  font-size: 16px;
}
.container-footer button {
  margin-top: 7px;
  border: 0;
  padding: 7px;
  cursor: pointer;
  border-radius: 4px;
  color: #FFFFFF;
  float: right;
}
.container-footer .txt {
  float: left;
  margin-top: 12px;
}
<!-- Material Icons (Google) -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

<div class="container">

  <!-- Container Head -->
  <div class="container-head">
    <i class="material-icons text-yellow-2">grade</i>
    <span>TÍTULO CONTAINER</span>

    <!-- Over-Flow Menu -->
    <div class='overflow-menu'>
      <i class="material-icons">more_vert</i>
    </div>

  </div>
  <!-- Container Body -->
  <div class="container-body">
    TEXTO
  </div>
  <!-- Container Footer -->
  <div class="container-footer">
    <div class="txt">
      RODAPÉ
    </div>
  </div>
</div>
    
26.12.2016 / 17:09