4 replies [Last post]
Chino
Offline
newbie
Last seen: 17 years 10 weeks ago
Joined: 2004-09-24
Posts: 2
Points: 0

is it possible to alter a specific word thoughout a document? so say if i had a page about dogs, that every time the word dog appeared it could be a different color...

thanks!

seb
Offline
Enthusiast
Last seen: 14 years 45 weeks ago
Joined: 2003-09-20
Posts: 208
Points: 0

Quick question...

with scripting (serverside or clientside) yes. With plain CSS, no.

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 8 years 19 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

Quick question...

On a simple, manual coding level, you could assign a class to each occurrence of the word with a span tag ( e.g. <span class="highlight">dog</span> ) and then configure the class with your formatting instructions ( e.g. .highlight { colour: red; } ). This would at least allow you to change the formatting of all such words in one line of code.

Life's a b*tch and then you die!

Chino
Offline
newbie
Last seen: 17 years 10 weeks ago
Joined: 2004-09-24
Posts: 2
Points: 0

Quick question...

k, thanks for the replIES!

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 8 years 19 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

Quick question...

Your question can be interpreted in many different ways!

Life's a b*tch and then you die!