PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.info.authoring.CSS > Place * on right of h2
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Place * on right of h2

Réponse
 
LinkBack Outils de la discussion
Vieux 02/03/2008, 17h12   #1
shapper
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Place * on right of h2

Hello,

I have a header as follows:

<h2>Manager <span class=""Orange"">*</span>"</h2>

..Orange {color: orange;}

Is there another way to place a orange * on the right of a header? And
should I do it this way?

If I could create this only with CSS then it might be easier to change
it if I need it.

Thank You,
Miguel
  Réponse avec citation
Vieux 02/03/2008, 17h50   #2
Jonathan N. Little
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Place * on right of h2

shapper wrote:
> Hello,
>
> I have a header as follows:
>
> <h2>Manager <span class=""Orange"">*</span>"</h2>
>
> .Orange {color: orange;}
>
> Is there another way to place a orange * on the right of a header? And
> should I do it this way?
>
> If I could create this only with CSS then it might be easier to change
> it if I need it.



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-language" content="en-us">

<title>:after pseudo elements</title>

<style type="text/css">
h2.special:after { content: "*"; }
</style>
</head>
<body>
<p>Standard caveats with IE's limited CSS support</p>
<h2>Normal Heading</h2>
<h2 class="special">Special Heading</h2>
</body>
</html>



--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
  Réponse avec citation
Vieux 02/03/2008, 18h26   #3
Beauregard T. Shagnasty
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Place * on right of h2

shapper wrote:

> I have a header as follows:
>
> <h2>Manager <span class=""Orange"">*</span>"</h2>


I would remove the extra quotemarks, which will probably cause failure.

> .Orange {color: orange;}


What will you do next week when the client says, "Make them green."

..Orange {color: green;} ??

Your code will look funny with an orange 'class' and a green asterisk.

> Is there another way to place a orange * on the right of a header? And
> should I do it this way?


I would probably do it this way, except ...

> If I could create this only with CSS then it might be easier to
> change it if I need it.


...I would not use "Orange" as the class name. Pick something that
describes the event.

..hdrstar { color: orange; background-color: transparent; }

<h2>Manager <span class="hdrstar">*</span></h2>

I'd recommend using all lower-case as well.

--
-bts
-Friends don't let friends drive Vista
  Réponse avec citation
Vieux 02/03/2008, 22h38   #4
Daniel Jung
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Place * on right of h2

Beauregard T. Shagnasty wrote:

>>.Orange {color: orange;}

>
> What will you do next week when the client says, "Make them green."
>
> .Orange {color: green;} ??
>
> Your code will look funny with an orange 'class' and a green asterisk.


I'm sure he meant the fruit. They are indeed green when not ripe. And
that doesn't look funny.

- Daniel
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 14h36.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11745 seconds with 12 queries