-2

I have a user managment block on my website and I'm trying to display a bit information there.
I think that nothing is better than example with pictures.
This is how the block looks now:

enter image description here

And this is how I want the block to look like:

Target Block

Is there any good way to do that? I added those dashes manually, and this is not the way I'm looking for, I want it responsive.

Here is the block code:

<div class="account-box">
 Welcome, guess. <br>
 <hr>
 Coins: <span style="float: right;">0</span> <br>
 Points: <span style="float: right;">0</span> <br>
 Total Referrals: <span style="float: right;">0</span> <br>
 <hr>
 Logged as [username] <span style="text-align: right;"><a href="/logout" class="btn btn-xs btn-danger"><span class="fa fa-sign-out fa-fw"></span>Logout</a></span>
</div>
D. Ataro
  • 1,711
  • 17
  • 38
guyshitz
  • 1
  • 5

1 Answers1

2

I recently had to do something similar. Here's what I came up with:

.entry {
  display: flex;
  align-items: center;
}
.entry>.spacer {
  flex-grow: 1;
  border-bottom: 1px dashed currentColor;
  margin: 4px;
}
<div class="entry">
  Label:
  <ins class="spacer"></ins>
  123
</div>

Adjust as needed!

Niet the Dark Absol
  • 320,036
  • 81
  • 464
  • 592