How to break line between CSS tags [closed]

0

I would like to know how to break line between tags of the same type Ex: I have several labels and I want to break the line between them, but so that I do once for all

    
asked by anonymous 04.10.2017 / 19:48

3 answers

1

An example I describe below

label{
  display: block;
}
<label>1</label>
<label>1</label>
<label>1</label>
<label>1</label>

In this code, it changes TODOS the labels of the page. If you just want to change a certain set of labels, put them inside a div and put it like this

<div class="topo">
<label>1</label>
    <label>1</label>
    <label>1</label>
    <label>1</label>
</div>

And in the styles put it this way.

.topo > label{
   display:block;
}
    
04.10.2017 / 19:55
2

You can also try this way

label{
    display:block;
    clear:left;
}
<label>Primeiro Texto</label>
<label>Segundo Texto</label>
<label>Terceiro Texto</label>
<label>Quarto Texto</label>

I hope I have helped;)

    
05.10.2017 / 15:30
0
<style>
    .texto1 {word-wrap:normal}
    .texto2 {word-wrap:break-word}
    p {width:60%;max-width:400px}
</style>

<p class="texto1" style="border:2px solid orange">Seu texto</p>
<p class="texto2" style="border:2px solid orange">Seu texto</p>
    
04.10.2017 / 19:53