<hr> at the end of the text

Asked

Viewed 136 times

-2

Very good afternoon, I’m developing a website, and the customer wants something like it’s in the image belowinserir a descrição da imagem aqui

but I’m only getting to put it that way :inserir a descrição da imagem aqui

<p>We Offer Clients<br>
    Incorporation Services on a Global Scale<br>
    Free Consultation
</p><hr> 

This is what I got, I’m new here I don’t know if I can see the code

Can anyone tell me what I’m missing? Regards

  • Without the code there is no way to say. I could elaborate a [mcve]?

  • Cara edits your question and puts at least the code you already have so far, even if it is just a P tag with the formatting, or something closer to your image in code and not just a photo...

1 answer

1

Here is an example

You need to put the P and the HR as an inline element, so one can "align" after the other and not fall to the bottom line. Then you need to put a defined width in the HR because it loses its scope when you change the display of it, only that this way it occupies the whole screen and you may need to put this text inside a container with overflow:hidden to better control the effect...

.box {
    width: 30%;
    border: 1px solid #000;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}
.box p {
    display: inline;
}
.box hr {
    display: inline;
    width: 100%;
    position: absolute;
}
<div class="box">
    <p>We Offer Clients<br>
        Incorporation Services on a Global Scale<br>
        Free Consultation
    </p>
    <hr>
</div>

  • 1

    thank you so much for your help, will help me a lot

  • @Brunoeusébio you actually have to understand what was done, stop to study a little about position and display this yes it will help you A LOT is the tip

  • @Brunoeusébio if you think the problem has been solved consider mark the Answer as Accepted so it is not pending on the site as pegunta did not respond.

Browser other questions tagged

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