Jump to content

Making certain word look differant?


Azu

Recommended Posts

Hi, I've noticed in some websites, that certain words are made to show up differently, and they don't even have anything around them in HTML.

 

Can somebody please tell me how to do this? E.G. make all instances of "BLAH" be underlined or something?

 

I'm totally stumped on this..  ???

Link to comment
https://forums.phpfreaks.com/topic/54256-making-certain-word-look-differant/
Share on other sites

Hi, I would like to use CSS as my mark-up language for this please.

 

 

And I don't remember the URL, it was one of the sites I was looking up CSS stuff on, and certain words had special effects on them but it wasn't in the html.

 

I am just wandering how I can do this to. With the CSS?

 

 

I have tried "Blah":before{content:"<u>"}"Blah":after{content:"</u>"} but it didn't work? Please tell me how.. :s

css needs some kind of element to make the selector or class/id inorder to act on anything.  If you are absolutley positive there is nothing like a span around the word then it is javascript doing the job.

 

to check switch js or css off and see what happens.

 

Well I know how to do it with links or pretty much any tag E.G. <b> so I'm pretty sure it can be done with words to I just don't know how.. so any help would be appreciated, please?

 

E.G. here is how to do it to links

 

a[href]:before{content:"lolerskates[div]"}

a[href]:after{content:"[div]rofelcopters"}

 

Please tell me how to do it to a certain word I would really really appreciate it.. in CSS not JS please.. :D

Sorry Azu but everyone on this thread agrees - you cannot do it on a single word that is in the same tage as other words without either JS doing a regular expresion replacement.

 

If you want css to do it then you MUST place something like <span> around the word and uss css to style that element..

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.