3
I have the code down that works normally.
But it contains a flaw.
If you’ll notice, the first and the third div’s are without class. Does that mean that don’t want rotate your spans.
But, not rotating, these 2 spans come out of li.
What to do to fix it?
span.vertical {
transform: translate(-50%, -50%) rotate(270deg);
}
div.cabecalhoVertical {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
width: 100%;
height: 200px;
align-items: center;
border: .1px rgb(0, 0, 0) solid;
}
div.cabecalhoVertical div {
position: relative;
height: 100%;
flex-grow: 1;
border-left: .1px rgb(0, 0, 0) solid;
}
div.cabecalhoVertical div span {
position: absolute;
width: 100%;
top: 50%;
left: 50%;
text-align: center;
}
<div class='cabecalhoVertical'>
<div style='width:100px;'><span class='' >Passo 1</span></div>
<div style='width:100px;'><span class='vertical'>Passo 2</span></div>
<div style='width:100px;'><span class='' >Passo 3</span></div>
<div style='width:050px;'><span class='vertical'>Passo 4</span></div>
<div style='width:050px;'><span class='vertical'>Passo 5</span></div>
<div style='width:050px;'><span class='vertical'>Passo 6</span></div>
<div style='width:050px;'><span class='vertical'>Passo 7</span></div>
<div style='width:050px;'><span class='vertical'>Passo 8</span></div>
<div style='width:050px;'><span class='vertical'>Passo 9</span></div>
<div style='width:050px;'><span class='vertical'>Passo 10</span></div>
<div style='width:050px;'><span class='vertical'>Passo 11</span></div>
<div style='width:050px;'><span class='vertical'>Passo 12</span></div>
<div style='width:050px;'><span class='vertical'>Passo 13</span></div>
</div>
has to increase the space of spans to fit the entire Step 13 in one line? Because it will have more than this
– Carlos Rocha
Updated answer. See that I put a red background to view the span size, then you delete from the CSS code the background: red
– Sam
Look, I was willing to accept your answer because it was great. But if it’s not too much to ask, is there any way to set an identical example but rather with Divs be with ul? I’ve been trying but with UL it’s like a column on the left side I can’t get out
– Carlos Rocha
I think it is possible. But I will only be able to see this later because I am doing a maintenance on the machine
– Sam
Oops, no problem. I look forward to it. Learn from someone who knows? It’s priceless.
– Carlos Rocha
Then the code: https://jsfiddle.net/gk2oL6a7/
– Sam