How do I put icon and text paragraph in one line?
20,110
Julia, remove all your floats:
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="date">
<i class="fa fa-user-o" aria-hidden="true"></i>
<p style="display: inline-block" >10/01/2018</p>
</div>
Also you might make it this way:
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="date">
<i class="fa fa-user-o"> 10/01/2018</i>
</div>
Related videos on Youtube
![Юлия Твердохлеб](https://lh4.googleusercontent.com/-qJ7PZEQApjQ/AAAAAAAAAAI/AAAAAAAAAGM/xCBipc6xn2E/photo.jpg?sz=256)
Author by
Юлия Твердохлеб
Updated on March 28, 2020Comments
-
Юлия Твердохлеб over 4 years
I want to put my font awesome icon and text paragraph into one line. How can I fix this code?
<div class="date" style="display: inline-block;"> <i class="fa fa-user-o" aria-hidden="true" style="float: left;"></i> <p style="display: inline-block; text-align: right;float: left;" >10/01/2018</p> </div>
-
Юлия Твердохлеб over 6 yearsWorks. Thank you!
-
Kosh over 6 yearsHappy to help !
-
MadeInDreams over 6 years@KoshVery I see sorry. But i think it still missleading to have bootstrap mentionned in the first line of your code when it isnt really required here.