supermario supermario - 1 month ago 9
CSS Question

How to make a div and a link inline?

I want the

div
and
a
elementes below to appear inline:

The result should be like:


Here is: Link 1


But they didn't work. So appreciate your hints.



.inline {
float: right;
display: block;
}
a.inline {
float: right;
}

<ul>
<li>
<div class="inline">Here is:</div>
<a href="/someurl" class="inline">Link 1</a>
</li>
</ul>





P.S. I'm using twitter bootstrap as css framework

Answer

Remove your a.inline styling and change your css to this:

.inline {
  display: inline-block;
}
Comments