Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Barış Çevik 1 post 71 karma points
    Aug 06, 2021 @ 20:25
    Barış Çevik
    0

    -webkit-line-clamp does not working when I add Model.Value("text") to <p> tag

    I have css code like this to restrict the number of lines of the paragraph.

        #videos .card-text {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }
    

    When I enter a text such as <p> Lorem ipsum .... </p> , I can restrict the number of lines. But when I write a code like <p> @Model.Value("Text") </p> this css code does not work and the whole paragraph appears.

    Why my css code does not work and what should I do.

Please Sign in or register to post replies

Write your reply to:

Draft