Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1216316

    Hey there,

    i`m looking for an option to underline text parts like in the image:
    https://ibb.co/0XtfwSD

    i would wrap the text part in a span class,- but how is the css part look like?

    thanks a lot!

    #1216485

    Hey awasner,

    Are you looking for all the text to have a background, or only half of like in your screenshot?

    Best regards,
    Rikard

    #1216486

    Dear Rikard,

    just simple words, not the whole sentence.
    Shoud be a little highlighting of words.

    thanks!
    Andreas

    #1216612

    Hi Andreas,

    Well, that part of the sentence should be wrapped in a span element and then maybe some css applied to it or some background image.

    Best regards,
    Victoria

    #1219307

    Hi Victoria,

    and how would the css part look like?
    can you give me some help?

    Best Regards,
    Andreas

    #1219690

    Hi Andreas,

    Please try something like this in your content:

    <p>This is a paragraph and <span class="yellow-background">this text has a yellow background</span></p>

    Then add this to Quick CSS:

    span.yellow-background {
      background: yellow;
    }

    Best regards,
    Rikard

    #1220428

    Dear Rikard,

    but this will make just a yellow background. as you can see in the picture, the background goes a bit underneath the text.

    thx
    Andreas

    #1220636

    Hi awasner,

    Could you please give us a link to your website, we need more context to be able to help you.

    Best regards,
    Victoria

    #1223775

    Dear Victoria,

    sorry for the late reply.

    On the following Demo Site you`ll see an example in the Menu.

    Thanks,
    Andreas

    #1223961

    Hi,

    Please try this instead:

    span.yellow-background:after {
        content: '';
        position: absolute;
        z-index: -1;
        background-color: yellow;
        bottom: 1px;
        left: -6px;
        width: calc(100% + 10px);
        height: 10px;
    }

    Best regards,
    Rikard

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.