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
4
Answers
display: inline
will do the trickRemove your
a.inline
styling and change your css to this:Please add the link inside of the div element:
I think @aer0 answer is correct and If you adding
it should work. try to open your browser style console and see if it being override by some other css rule.