• 0

text replacement with css?


Question

i am learning a little css, and was playing around with the tags ie, make <blue> </blue> turn the font blue etc....making ur own tags, then i decided i wanted to try to make a tag called <smile> show a smile using css, i know this probly isnt how its done, but humour me :p i was just wondering if its possible.

and how do u do the text to smile? are u just using php character replacement?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

i am learning a little css, and was playing around with the tags ie, make <blue> </blue> turn the font blue etc....making ur own tags, then i decided i wanted to try to make a tag called <smile> show a smile using css, i know this probly isnt how its done, but humour me :p i was just wondering if its possible.

and how do u do the text to smile? are u just using php character replacement?

Assuming you've written your own DTD or extended the W3C XHTML DTDs and you're actually serving up XML properly then what you propose is perfectly valid (though probably not a great idea for the web).

If you wanted <smile /> to show a picture of a smily face you could do something like:

smile {
display:block;
width:100px;
height:100px;
text-indent-1000em;
text-align:left;
background:url(smile.png) no-repeat left top;
}

Of course IE6/Win doesn't display XHTML properly so if you did go this route you'll be severely limiting your audience or ****ing all over the standards?your choice?and you'll be producing markup that no search engine or browser will apply any real meaning to.

Link to comment
Share on other sites

  • 0

lol, i wasnt actually gonna do that, i was just wondering how, just for fun :p

so do these forums just use php character replacement, but to an image?

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.