How to break line between CSS tags

Asked

Viewed 2,423 times

1

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

3 answers

3

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’ve helped ;)

  • 1

    What is the function of clear: left in his reply?

  • If it is a floating object, the clear causes it to throw the object to the left below the previous object.

  • Nice, it worked out

1


An example that I describe below

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

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

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

And in the styles put as follows.

.topo > label{
   display:block;
}
  • It worked fine, thanks

  • Give the answer as approved :)

  • I’d like to, but I don’t know how

  • @Jeansimas There’s a certain button next to the number of votes in my answer :)

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>
  • 1

    You can comment, in Portuguese itself, how this example responds to what was asked, and what the difference to be expected between the two forms?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.