• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Create a style to have prefix & suffix character

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a requirement to define a style such that the data always appears between paranthesis. For ex, if I have a style called textwith3indent, is it possbile to define this style in a such a manner that when it is applied, the reulting data appears in paranthesis,

If the data is

"sample data"

after application of the style, it has to look like

(sample data)

Please let me know if that is doable by mere application of style.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not in the current CSS spec you can not do it. In the future one you will be able to do it.

Why don't you do some sort of replace with the string on the server?

You could also try using JavaScript to make the changes of the innerHTML, but it would not be your best solution.

Eric
 
Priyaa V Kumar
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Eric for the quick response. I was also thinking in the same lines of appending the prefix & suffix characters to the real data. The other group in here wanted to do it using style. Just wanted to confirm that there is no way to do it using a style alone before telling them.

Thankyou.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want more info look at this: http://www.w3schools.com/css/css_pseudo_elements.asp

look at before and after.

Eric
 
reply
    Bookmark Topic Watch Topic
  • New Topic