2
I have two information, an email and a number ( phone ), between the two put a hyphen. I want to center the hyphen in the middle of the screen and put the email on the left side of that hyphen and the number on the right side. Someone can help me how to do this, I’ve tried a lot, and it never gets aligned right. I’m using the Vue CLI + Vue Router
HTML
<template>
<div class="container">
<h1>Leads</h1>
<div class="leads">
<div v-for="lead in leads" :key="lead.id" class="lead">
<h2>{{ lead.nome }}</h2>
<div class="lead-contact">
<span id="first">{{ lead.email }}</span>
<b>-</b>
<span>{{ lead.telefone }}</span>
</div>
...
CSS
.container h1 {
text-align: center;
font-size: 26pt;
}
.leads {
display: flex;
flex-direction: column;
margin-top: 70px;
align-items: center;
}
.lead {
width: 90%;
max-width: 700px;
position: relative;
display: block;
}
.lead h2 {
text-align: center;
letter-spacing: 1px;
color: #9e00ff;
}
It doesn’t line up in the hyphen, it lines up the whole sentence.
– Azus5
@Azus5 I think I understand now, take a look at the edition I made in the reply
– hugocsl
That’s right, you saved me. Thank you very much!!!
– Azus5
@Blue ;)
– hugocsl
Use the:flex display with a space-between.
– e200
@E200 logically you did not test with space-between né, you would see that it would look like this https://prnt.sc/t6e0c3 ... totally WRONG :/
– hugocsl