Foros de discusión

CSS - Text Replace

thumbnail
Klee Seubi, modificado hace 11 años.

CSS - Text Replace

Junior Member Mensajes: 28 Fecha de incorporación: 8/06/12 Mensajes recientes
Hello everybody,

does anyone of you know a CSS code for replacing "text"?

I'm using LR 6.0 and on one page I want to rewrite the text of a tab.

Hope you can help me.

With kind regards,

Klee Seubi
thumbnail
Hari Dobbala, modificado hace 11 años.

RE: CSS - Text Replace

Junior Member Mensajes: 29 Fecha de incorporación: 18/11/12 Mensajes recientes
Hi Klee,

I think using css, it is not possible to replace the text. Generally in this scenarios javascript like jQuery is used as below.

$('.someClassName').text('new text');

But using css, it is possible to add the new content, before or after the old content like...

.someClassName:after {
content: "new content";
}

Hope it may help you.
thumbnail
Hitoshi Ozawa, modificado hace 11 años.

RE: CSS - Text Replace

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
CSS is just a stylesheet to specify how an element should appear. It doesn't put or change an element.
That is, you can't replace "text" using css.

Are you trying to replace a string "text" that appears on a page?
thumbnail
Klee Seubi, modificado hace 11 años.

RE: CSS - Text Replace

Junior Member Mensajes: 28 Fecha de incorporación: 8/06/12 Mensajes recientes
Hello everybody,

thanks for the useful info (text before and after).

@ Hitoshi: what do you mean with "string" text?

- Greetings,

Klee Seubi
thumbnail
Apoorva Prakash, modificado hace 11 años.

RE: CSS - Text Replace

Liferay Master Mensajes: 658 Fecha de incorporación: 15/06/10 Mensajes recientes
The only kind of change in text (from the original one) using CSS is the text transform property, as

h1 {text-transform:uppercase;}
h2 {text-transform:capitalize;}
p {text-transform:lowercase;}


Thanks and Regards,
Apoorva Prakash
Alex Belt, modificado hace 11 años.

RE: CSS - Text Replace

Junior Member Mensajes: 49 Fecha de incorporación: 9/10/12 Mensajes recientes
There is one possibility in CSS 3, but it relies on the user having a browser that supports the feature, and you'd have to get the CSS onto the page.

You can read about it here:
http://www.cssportal.com/css-properties/text-replace.htm