#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2014
    Posts
    1
    Rep Power
    0

    Not sure if this is possible with css so I'll ask


    I would like to make it so, for example, "<something/>" becomes "example", is this possible? Sorry if I'm being vague or breaking some rule.
  2. #2
  3. Lord of the Dance
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Oct 2003
    Posts
    3,673
    Rep Power
    1958
    You can use CSS to change position and color of text.

    It seems you try to change a tag-element into a text-string. This would better fit with JavaScript.

    Maybe you can describe exactly what you want? with better real-life examples.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2014
    Posts
    29
    Rep Power
    0
    You can use CSS to substitute text, OR to style it, but not both at the same time. For example:



    Code:
    <span class="substitution-string"></span>
    with
    Code:
    .substitution-string:before {
       content: "example";
    }

    OR

    Code:
    <span class="special-text">example</span>
    with
    Code:
    .special-text {
       color: green;
    }
    But you can't style text that you add with
    Code:
    content:
    using CSS.

    But to do both, as MrFujin says, JavaScript would probably be the way to go.

IMN logo majestic logo threadwatch logo seochat tools logo