I use a javascript solution which goes around as se_hilite.js
You can tell it to highlight words using javascript. This will offcourse change your html, because it adds span tags.
-r-
Main Topics
Browse All Topicsi'm looking for a solution to add formatting to a string that appears on a rendered page.
something like this:
<style>
.mycompany{font-weight:bol
</style>
---- some content ----
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. Ut wisis enim mycompany ad minim veniam, quis nostrud exerci tution ullam corper suscipit lobortis nisi ut aliquip ex ea commodo consequat. Duis te feugi facilisi. Duis autem dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu mycompany feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit au gue duis dolore mycompany te feugat nulla facilisi.
------/// -----------
inside the text the word "mycompany" appears three times, is there any solution to add a certain style only to a word that match a certain string - without having to touch the actual content in anyway?
thank you in advance
joergen astroem
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
as neester said. only with css no.
you can use a simply function in server or client side language as ASP, PHP (server side) or Javascript (client) to "replace" mycompany with <strong>mycompany</strong>
in server side:
<%
'ASP 3.0
function parse_text(maintext, keywor)
maintext=replace(maintext,
parse_text=maintext
end function
%>
<?
//PHP 4
function parse_text($maintext, $keyword){
$maintext=str_replace($key
return $maintext;
}
?>
Business Accounts
Answer for Membership
by: Eternal_StudentPosted on 2005-11-02 at 08:26:02ID: 15209298
the only method [using css purely] would be to surround the word with a span tag.
<span class="mycompany">your word</span>rest of text rest of text rest of text rest of text rest of text rest of text rest of text rest of text <span class="mycompany">your word</span>
Like so. There may be another method but I am not aware of it ?