TriSTaR TriSTaR - 4 months ago 8
HTML Question

The implementation of the button "Ask"

I want to create this button "question":

enter image description here

but in the implementation I do not understand how to do it, it seems easy, but i can't do this.. =( idiot
code which I did:



body {
background-color: black;
}

.ag_question {
float: left;
margin-top: 20px;
}
span.block1 {
background-color: #fb8f02;
padding: 14px 12px;
border: 1px solid #444;
}
.ag_question a {
font-size: 15px;
color: #fff;
padding: 14px 12px;
border: 1px solid #444;
text-decoration: none;
}

<body>
<div class="ag_question">
<span class="block1">
<img src="http://storage3.static.itmages.ru/i/16/0713/h_1468392215_2753574_1f123fce00.png" alt="">
</span>
<a href="#">Задать вопрос</a>
</div>
</body>





I want the icon inside the link was....

Answer

Add span tag in a tag. like this:

body {
  background-color: black;
  }

.ag_question {
    float: left;
    margin-top: 20px;
}
span.block1 {
    background-color: #fb8f02;
    padding: 14px 12px;
    border: 1px solid #444;
    margin-right:10px;
}
span.block1 img{
    vertical-align: middle;
}
 
.ag_question a {
    font-size: 15px;
    color: #fff;
    padding: 14px 12px 14px 0px;
    border: 1px solid #444;
    text-decoration: none;
}
<body>
<div class="ag_question">
	<a href="#">
      <span class="block1">
        <img src="http://storage3.static.itmages.ru/i/16/0713/h_1468392215_2753574_1f123fce00.png" alt="">
      </span>
      Задать вопрос
   </a>
</div>
  </body>