Reputation: 1078
I have this example code:
<li><a href="#"><em>€ 2,75</em> Koffie</a></li>
Witch I have to make like this the image. "euro 2,75" right-aligned "koffie" left-aligned
What I have tried so far css:
em {
float: right;
}
a {
float: left;
}
and
<li><a href="#"><em>€<span style="float:right;"> 2,75</span></em> <span style="float:left;"> Koffie</span></a></li>
witch has to work on a normal line text but none of these works. Is this even possible?
Upvotes: 2
Views: 3936
Reputation: 554
li {
width: 200px;
}
.one {
float: left;
text-align: left;
}
.two {
float: right;
text-align: right;
}
<li><a href="#"><span class="one"><em>Koffie</em></span><span class="two">€ 2,75</span></a></li>
Upvotes: 3