Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display text to the right of icon in same line

Tags:

css

I want to display text on the right side which is aligned perfectly in the code. How can I do it? I do not want to use position absolute.

.down {
margin-top: 5px;
border: 1px solid red;
}

.icontext {
display: inline-block;
margin-right: 8px;
}
like image 299
Om3ga Avatar asked Oct 29 '25 21:10

Om3ga


1 Answers

This will vertically align the span tags with the img tags

.icontext {
    vertical-align: middle;
    margin-right: 8px;
}

.icon{
    vertical-align: middle;
}

Example: http://jsfiddle.net/ykdnB/2/

like image 80
Kevin Bowersox Avatar answered Nov 01 '25 10:11

Kevin Bowersox