Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

css left and top margin on bootstrap labels

this is my blog main page http://lowcoupling.com/ it is a tumblr blog based on Twitter bootstrap. I am trying to have the badges in the footer representing the main topics more separated vertically in this way:

<span style="margin-left:2px; margin-top:5px;"> <a href="http://lowcoupling.com/tagged/UML/chrono"><span class="label label-default">UML</span> </a></span>

the problem is that the left margin works but the top margin doesn't.

like image 480
lowcoupling Avatar asked Mar 22 '23 23:03

lowcoupling


1 Answers

you need to set display:block; and float them to left. it is better that you create a class like this: HTML:

<span class="footer-link">
<a href="http://lowcoupling.com/tagged/UML/chrono">
<span class="label label-default">UML</span>
</a>
</span>

CSS:

span.footer-link{
   display:block;
   float:left;
   margin:5px 0 0 2px;
}
like image 152
Mohsen Safari Avatar answered Mar 24 '23 12:03

Mohsen Safari