Jump to content

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..

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.