hr at the end of the text [closed]

-2

Very good afternoon, I'm developing a website, and the client wants something like this in the image below

ButIcanonlyputitlikethis:

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

This is what I have, I am new here I do not know if you can see the code

Can anyone tell me what is failing me? Best Regards

    
asked by anonymous 21.11.2018 / 15:33

1 answer

1

Here is an example

You need to put P and HR as an element in line, so one can "line up" after the other and not fall to the bottom line. Then you need to put a width defined in the HR because it loses the scope when you change the display of it, but that way it occupies the entire screen and you may need to put that 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>
    
21.11.2018 / 16:14