Issue
I have some code that looks like this
<div class="topnav">
<div>{{getGameView.Game.gameplayers[0].player.username}}</div>
<p>VS</p>
<div v-if="getGameView.Game.gameplayers.length > 1">
{{getGameView.Game.gameplayers[1].player.username}}
</div>
<div v-else>Waiting for opponent...</div>
</div>
Which prints this: NameVSName I am trying to make it so that between Name and VS there is some space but cannot figure out how to do it.
Solution
A solution is to give to the VS
element a class like .vs
and add some padding
to it:
p {
margin: 0;
}
.topnav {
display: flex;
}
.topnav .vs {
padding-right: 10px;
padding-left: 10px;
}
<div class="topnav">
<div>Name</div>
<p class="vs">VS</p>
<div>Name</div>
</div>
Answered By - johannchopin
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.