Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > specific css everytime a word appears?

Reply
Thread Tools

specific css everytime a word appears?

 
 
chris
Guest
Posts: n/a
 
      02-14-2004
Is it possible to automatically assign a specific attribute to a specific
word in a text paragraph with css? Ive found something that assigns css to
some css wich has a specific parameter but not to a text. Also it works only
with netscape.

For e.g. I have the word "elke" (which is the name of a band) appearing very
often over the whole website. I want it bold everytime. Is there a solution
to automatically apply the bold attribute? Or do I have to apply it for
every appearence?

chris---


 
Reply With Quote
 
 
 
 
altamir
Guest
Posts: n/a
 
      02-14-2004
"chris" <(E-Mail Removed)> wrote in news:c0jp6d$oj9$01$(E-Mail Removed)-online.com:

> Is it possible to automatically assign a specific attribute to a
> specific word in a text paragraph with css?


no.

> Ive found something that
> assigns css to some css wich has a specific parameter but not to a
> text. Also it works only with netscape.
> For e.g. I have the word "elke" (which is the name of a band)
> appearing very often over the whole website. I want it bold everytime.
> Is there a solution to automatically apply the bold attribute? Or do I
> have to apply it for every appearence?


use search-replace function, which goes with every server-side language
(like php), to replace 'elke' with '<strong>elke</strong>'. if you don't
have an access to server-side scripts you can alternatively use text editor
to do that locally.

--
altamir
 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      02-15-2004
"chris" <(E-Mail Removed)> wrote:

> Is it possible to automatically assign a specific attribute to a
> specific word in a text paragraph with css?


No. In HTML, you could define and use an entity, if only browsers had
ever implemented even HTML 2.0. In practice, use a good editor to
perform a global replace - or reconsider what you are doing.

> For e.g. I have the word "elke" (which is the name of a band)
> appearing very often over the whole website.


Shouldn't it be written as "Elke", if it is a proper name? This might
remove the problem. In other words, you might have created the problem
by using a name in odd spelling. Just stop doing that. (This reminds me
of a recent incident when an insurance company tried to start using
"if..." as its company name. The idea surely looked good on the dee-
sigh-ner's screen.)

> I want it bold everytime.


Hardly a good idea, since bolding tends to emphasize global importance,
and if you emphasize the occurrences of a single word that much, you
can't really _emphasize_ anything. And it disrupts reading. In any
case, if you still use bolding, use <b>...</b> and not
<strong>...</strong>, since it's really not a matter of strong emphasis
but style. That way, maybe some people who use a speech synthesizer
will avoid hearing those occurrences in a raised voice.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
chris
Guest
Posts: n/a
 
      02-16-2004
"Jukka K. Korpela" <(E-Mail Removed)> schrieb im Newsbeitrag
news:Xns9490E37775011jkorpelacstutfi@193.229.0.31. ..
> "chris" <(E-Mail Removed)> wrote:
>
> > Is it possible to automatically assign a specific attribute to a
> > specific word in a text paragraph with css?

>
> No. In HTML, you could define and use an entity, if only browsers had
> ever implemented even HTML 2.0. In practice, use a good editor to
> perform a global replace - or reconsider what you are doing.
>
> > For e.g. I have the word "elke" (which is the name of a band)
> > appearing very often over the whole website.

>
> Shouldn't it be written as "Elke", if it is a proper name? This might
> remove the problem. In other words, you might have created the problem
> by using a name in odd spelling. Just stop doing that. (This reminds me
> of a recent incident when an insurance company tried to start using
> "if..." as its company name. The idea surely looked good on the dee-
> sigh-ner's screen.)
>
> > I want it bold everytime.

>
> Hardly a good idea, since bolding tends to emphasize global importance,
> and if you emphasize the occurrences of a single word that much, you
> can't really _emphasize_ anything. And it disrupts reading. In any
> case, if you still use bolding, use <b>...</b> and not
> <strong>...</strong>, since it's really not a matter of strong emphasis
> but style. That way, maybe some people who use a speech synthesizer
> will avoid hearing those occurrences in a raised voice.
>
> --
> Yucca, http://www.cs.tut.fi/~jkorpela/
> Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
>


Thanks for the help guys. I solved the problem by simply doing a global
replace, but I thought it would be much nicer (and better for later changes)
to do it with css.

To Jukka: The word is actually written "EL*KE". Its the bands name and much
like a logo and theres nothing i can do about it. Also not I but the client
wanted it bold. But i could convince them that this is a 'not so good idea'

However there was another Problem with the name cause some (Mac) browser
broke up the word at the '*' if the word was at the end of the line, making
it look very bad. So I had to put some <nobr> around it.

chris


 
Reply With Quote
 
Nick Theodorakis
Guest
Posts: n/a
 
      02-16-2004
On Mon, 16 Feb 2004 01:23:36 +0100, "chris" <(E-Mail Removed)> wrote:


[...]

>
>To Jukka: The word is actually written "EL*KE". Its the bands name and much
>like a logo and theres nothing i can do about it. Also not I but the client
>wanted it bold. But i could convince them that this is a 'not so good idea'
>
>However there was another Problem with the name cause some (Mac) browser
>broke up the word at the '*' if the word was at the end of the line, making
>it look very bad. So I had to put some <nobr> around it.


In that case, if you are using <nobr> only to mark up the band's
name, how about just styling the <nobr> as bold in your css file?

Nick

--
Nick Theodorakis
http://www.velocityreviews.com/forums/(E-Mail Removed)
nicholas_theodorakis [at] urmc [dot] rochester [dot] edu
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      02-16-2004
Under Subject: Re: specific css everytime a word appears?
"chris" <(E-Mail Removed)> wrote:

> The word is actually written "EL*KE". - -
> However there was another Problem with the name cause some (Mac)
> browser broke up the word at the '*' if the word was at the end of
> the line, making it look very bad.


That's very strange. What browser might that be?

I'm actually not surprised at hearing that browsers break lines that
oddly. But it's particularly odd, because the asterisk belongs to line
breaking class ( http://www.cs.tut.fi/~jkorpela/unicode/linebr.html )
AL, which means 'alphabetic', so EL*KE should be treated in line
breaking as if the asterisk were a letter.

> So I had to put some <nobr> around it.


Yes, that's the practical solution.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
router needs to be rebooted everytime =?Utf-8?B?WFAgV2lyZWxlc3MgVXNlcg==?= Wireless Networking 0 04-07-2006 01:47 AM
Is server cache reloaded everytime when web.config changes? =?Utf-8?B?V2ViTWF0cml4?= ASP .Net 1 01-27-2006 09:11 PM
Everytime I open Firefox the box comes up davethefourth@gmail.com Firefox 1 09-17-2005 10:49 PM
Everytime I hover cursro over a posting, it crosses out with red mark on it.. on every posting alanb ASP .Net 2 04-23-2004 02:23 PM
Why doesn't the COUNTER show up everytime I visit the site? Nicole Kidman Computer Support 6 08-03-2003 09:47 AM



Advertisments