• sacconi

    (@sacconi)


    I ‘d like to have the text on the right sidebar with a full border of the same size on all the sides of the letters, like here: https://ibb.co/1nWdp9x , now I have a sort of shadow, how can I change that?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • WP Provider

    (@wpprovider)

    Hello Sacconi,

    You mean a text-shadow?
    That could be done by adding CSS like this:
    https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow

    Example: text-shadow: 2px 1px 2px #289dcc

    Or a border:
    https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-text-stroke

    darerodz

    (@darerodz)

    Hi, @sacconi. For your case, I think it would be better to convert the text into an SVG element so you can use the stroke and the stroke-width properties in CSS, like in this StackOverflow example.

    Hope it helps!

    Thread Starter sacconi

    (@sacconi)

    It works also if I’m using gettext? Now my text comes from a shortcode with a gettexted element

    Moderator bcworkz

    (@bcworkz)

    CSS can be applied to text regardless of what language the text represents. Gettext cannot be used if the words are in any graphic format like SVG, JPEG, WEBP, etc. However, you could configure your shortcode to return different SVG elements depending upon locale. This would only be practical if your site only supports a limited number of languages, which I know is your situation.

    Different SVG elements would be conceptually similar to specifying different complete images, each of which contains words in a different language. However, SVG based words would be technically superior to words within a JPEG or PNG image. But gettext still cannot be used with any graphic element.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘CSS for a text’ is closed to new replies.