Word exceptions for P:first-line { text-transform: uppercase }

  • Thread starter Luigi Donatello Asero
  • Start date
L

Luigi Donatello Asero

Hello,
I use
P:first-line { text-transform: uppercase }
in a relative sheet and I would like to customize it so that it does not
apply for
the words "Scaiecat Spa Gigi" for example on the page
https://www.scaiecat-spa-gigi.com/de/italien/sizilien.php
How do I do that?
--
Luigi Donatello Asero
(sono italiano ma vivo in Svezia)
(Ñ Ð¸Ñ‚Ð°Ð»ÑŒÑнец но Ñ Ð¶Ð¸Ð²Ñƒ в Швеции )
(我是 æ„大利人 , 但是 我 ä½ åœ¨ ç‘žå…¸)
(minä olen Italian kansalainen, mutta minä asun Ruotsissa)
(yo soy italiano mas vivo en Suecia)
(je suis italien mais j'habite en Suède)
(ich bin Italiener aber ich lebe in Schweden)
https://www.scaiecat-spa-gigi.com/sv/presentartiklar.php
 
D

Disco Octopus

Luigi said:
P:first-line { text-transform: uppercase }

not sure if you can identify your words list that you do not want to
modify, but if you can, then this may work.....



<html>
<head>
<style type="text/css">
p:first-line { text-transform: uppercase }
p .notouch { text-transform: none }
</style>
</head>
<body>
<p>Auf dieser Internetseite gibt das Einzelunternehmen (enskild firma)
<span class="notouch">Scaiecat Spa Gigi</span> Auskünfte über Sizilien. Auf
dieser Internetseite gibt das </p>
</body>
</html>
 
L

Luigi Donatello Asero

Disco Octopus said:
not sure if you can identify your words list that you do not want to
modify, but if you can, then this may work.....



<html>
<head>
<style type="text/css">
p:first-line { text-transform: uppercase }
p .notouch { text-transform: none }
</style>
</head>
<body>
<p>Auf dieser Internetseite gibt das Einzelunternehmen (enskild firma)
<span class="notouch">Scaiecat Spa Gigi</span> Auskünfte über Sizilien. Auf
dieser Internetseite gibt das </p>
</body>
</html>


It works but I have to look for all the words on each page.
Could I let php search for the words automatically and insert them in a
<span class>?
Or perhaps write a rule which is valid just for those words?

--
Luigi Donatello Asero
(sono italiano ma vivo in Svezia)
(Ñ Ð¸Ñ‚Ð°Ð»ÑŒÑнец но Ñ Ð¶Ð¸Ð²Ñƒ в Швеции )
(我是 æ„大利人 , 但是 我 ä½ åœ¨ ç‘žå…¸)
(minä olen Italian kansalainen, mutta minä asun Ruotsissa)
(yo soy italiano mas vivo en Suecia)
(je suis italien mais j'habite en Suède)
(ich bin Italiener aber ich lebe in Schweden)
https://www.scaiecat-spa-gigi.com/sv/faktaomitalien.php
 
M

Mark Parnell

Could I let php search for the words automatically and insert them in a
<span class>?

Yep. A simple str_replace should do it:

str_replace('Scaiecat Spa Gigi','<span class="notouch">Scaiecat Spa
Gigi said:
Or perhaps write a rule which is valid just for those words?

Not in CSS.
 
L

Luigi Donatello Asero

Mark Parnell said:
Yep. A simple str_replace should do it:

str_replace('Scaiecat Spa Gigi','<span class="notouch">Scaiecat Spa
Gigi</span>');


I tried to insert it on this page.
but it does not work. Why?

https://www.scaiecat-spa-gigi.com/sv/valkommen.php


--
Luigi Donatello Asero
(sono italiano ma vivo in Svezia)
(Ñ Ð¸Ñ‚Ð°Ð»ÑŒÑнец но Ñ Ð¶Ð¸Ð²Ñƒ в Швеции )
(我是 æ„大利人 , 但是 我 ä½ åœ¨ ç‘žå…¸)
(minä olen Italian kansalainen, mutta minä asun Ruotsissa)
(yo soy italiano mas vivo en Suecia)
(je suis italien mais j'habite en Suède)
(ich bin Italiener aber ich lebe in Schweden)
https://www.scaiecat-spa-gigi.com/it/svezia.html
 
D

Disco Octopus

It works but I have to look for all the words on each page.
Could I let php search for the words automatically and insert them in a
<span class>?
Or perhaps write a rule which is valid just for those words?

I would do this php.

somethign like this???


<?php
$mytText = "Auf dieser Internetseite gibt das Einzelunternehmen
(enskild firma)Scaiecat Spa Gigi Auskünfte über Sizilien. Auf dieser
Internetseite gibt das ";

$startthing = "<span class=\"notouch\">";
$endthing = "</span>";

$phrases[0]="Scaiecat Spa Gigi";
$phrases[1]="Do Not Uppercase This";
$phrases[2]="Ralph Malph";

echo "before : $mytText <br>\n";

reset($phrases);
while (list($key, $findText) = each($phrases)) {
$mytText = str_replace($findText, $startthing . $findText .
$endthing, $mytText);
}

echo "after : $mytText <br>\n";

?>
 
M

Mark Parnell

I tried to insert it on this page.
but it does not work. Why?

Because I'm an idiot. :)

Firstly, str_replace needs a 3rd parameter, being the text to search.
But it's not really going to help you unless your content comes out of a
database, because otherwise you would have to put the entire body of the
document inside the str_replace function (or wrap it around every
paragraph, which would take longer than just replacing the text in the
first place.

Unless your content is in a database, you'd be better off doing a global
search and replace in your HTML editor.
 
L

Luigi Donatello Asero

Mark Parnell said:
Because I'm an idiot. :)

Firstly, str_replace needs a 3rd parameter, being the text to search.
But it's not really going to help you unless your content comes out of a
database, because otherwise you would have to put the entire body of the
document inside the str_replace function (or wrap it around every
paragraph, which would take longer than just replacing the text in the
first place.

Unless your content is in a database, you'd be better off doing a global
search and replace in your HTML editor.

There is some content in a database for some pages but it is only a little
part, so it sounds that this method is not appropriate.
What do you mean by "global search"?
Searching on all the pages?
Is there really any chance to style css in a way that it creates exceptions
for some words for the rule

--
Luigi Donatello Asero
(sono italiano ma vivo in Svezia)
(Ñ Ð¸Ñ‚Ð°Ð»ÑŒÑнец но Ñ Ð¶Ð¸Ð²Ñƒ в Швеции )
(我是 æ„大利人 , 但是 我 ä½ åœ¨ ç‘žå…¸)
(minä olen Italian kansalainen, mutta minä asun Ruotsissa)
(yo soy italiano mas vivo en Suecia)
(je suis italien mais j'habite en Suède)
(ich bin Italiener aber ich lebe in Schweden)
https://www.scaiecat-spa-gigi.com/de/alles-ueber-italien.php
 
L

Luigi Donatello Asero

Luigi Donatello Asero said:
Is there really any chance to style css in a way that it creates exceptions
for some words for the rule



Isn´t there really any chance to style css in a way that it creates
exceptions
for some words to the uppercase rule without needing searching all of the
words manually?

--
Luigi Donatello Asero
(sono italiano ma vivo in Svezia)
(Ñ Ð¸Ñ‚Ð°Ð»ÑŒÑнец но Ñ Ð¶Ð¸Ð²Ñƒ в Швеции )
(我是 æ„大利人 , 但是 我 ä½ åœ¨ ç‘žå…¸)
(minä olen Italian kansalainen, mutta minä asun Ruotsissa)
(yo soy italiano mas vivo en Suecia)
(je suis italien mais j'habite en Suède)
(ich bin Italiener aber ich lebe in Schweden)
https://www.scaiecat-spa-gigi.com/de/alles-ueber-italien.php
 
M

Mark Parnell

What do you mean by "global search"?
Searching on all the pages?
Yes.

Is there really any chance to style css in a way that it creates exceptions
for some words for the rule

No. CSS has nothing to do with the content - that's the point of it.
 
L

Luigi Donatello Asero

Mark Parnell said:
No. CSS has nothing to do with the content - that's the point of it.


Ok, on second thoughts what did you mean by a html editor?
Actually, I code by hand.

--
Luigi Donatello Asero
(sono italiano ma vivo in Svezia)
(Ñ Ð¸Ñ‚Ð°Ð»ÑŒÑнец но Ñ Ð¶Ð¸Ð²Ñƒ в Швеции )
(我是 æ„大利人 , 但是 我 ä½ åœ¨ ç‘žå…¸)
(minä olen Italian kansalainen, mutta minä asun Ruotsissa)
(yo soy italiano mas vivo en Suecia)
(je suis italien mais j'habite en Suède)
(ich bin Italiener aber ich lebe in Schweden)
https://www.scaiecat-spa-gigi.com/de/alles-ueber-italien.php
 
J

Jonathan N. Little

Luigi Donatello Asero wrote:
Ok, on second thoughts what did you mean by a html editor?
Actually, I code by hand.
Well if it is notepad, try CTRL-H, otherwise manipulation of code with
your fingers can get messy ;-)
 
S

Sid Ismail

On Tue, 25 Oct 2005 13:07:15 GMT, "Luigi Donatello Asero"

: Ok, on second thoughts what did you mean by a html editor?
: Actually, I code by hand.

What your hand uses, even if it Notepad.

Sid

** I'd give my right hand to be ambidexterous
 
S

Sid Ismail

On Tue, 25 Oct 2005 15:25:26 GMT, "Jonathan N. Little"

: > Ok, on second thoughts what did you mean by a html editor?
: > Actually, I code by hand.
: >
: Well if it is notepad, try CTRL-H, otherwise manipulation of code with
: your fingers can get messy ;-)


Ghoulash.

Sid
 
N

Neredbojias

With neither quill nor qualm, Sid Ismail quothed:
On Tue, 25 Oct 2005 13:07:15 GMT, "Luigi Donatello Asero"

: Ok, on second thoughts what did you mean by a html editor?
: Actually, I code by hand.

What your hand uses, even if it Notepad.

Sid

** I'd give my right hand to be ambidexterous

I'd give up my peace-of-mind to be ambivalent.
 
D

dorayme

From: "Luigi Donatello Asero said:
Ok, on second thoughts what did you mean by a html editor?
Actually, I code by hand.

Ah, you do? Listen then, if you used an editor of some kind,
even notepad, you would find it much easier.
 
L

Luigi Donatello Asero

dorayme said:
Ah, you do? Listen then, if you used an editor of some kind,
even notepad, you would find it much easier.

Thank you Dorayme.
How is life going on Mars?
Did you find any water?


--
Luigi Donatello Asero
(sono italiano ma vivo in Svezia)
(Ñ Ð¸Ñ‚Ð°Ð»ÑŒÑнец но Ñ Ð¶Ð¸Ð²Ñƒ в Швеции )
(我是 æ„大利人 , 但是 我 ä½ åœ¨ ç‘žå…¸)
(minä olen Italian kansalainen, mutta minä asun Ruotsissa)
(yo soy italiano mas vivo en Suecia)
(je suis italien mais j'habite en Suède)
(ich bin Italiener aber ich lebe in Schweden)
https://www.scaiecat-spa-gigi.com/sv/boende-i-italien.php
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top