Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Background-image

0 views
Skip to first unread message

Bernd

unread,
Oct 21, 2009, 6:18:13 AM10/21/09
to
Hi,

J'ai fait un cadre dans lequel doit figurer en haut � droite une image.
Le CSS donne :
(1) background-image:url(images/croix.gif);
background-position: top right;
background-repeat:no-repeat;
Et �a marche.

En voulant faire la r�gle abr�g�e, j'ai �crit :
(2) background-image:url(images/croix.gif) no-repeat top right;
Et l� l'image n'appara�t pas.

Avez-vous une id�e o� se trouve l'erreur en (2).

Merci
--
A+

Romer

yamo'

unread,
Oct 21, 2009, 6:27:45 AM10/21/09
to
Salut,

Bernd a tapot�, le 21/10/2009 12:18:

> (2) background-image:url(images/croix.gif) no-repeat top right;
> Et l� l'image n'appara�t pas.


Le validateur <http://jigsaw.w3.org/css-validator/#validate_by_input> veut :

.test{
background:url(images/croix.gif) no-repeat top right;
}

--
St�phane
http://pasdenom.info/fortune

Bernd

unread,
Oct 21, 2009, 6:35:37 AM10/21/09
to
yamo' <ya...@replyto.invalid> wrote:

> .test{
> background:url(images/croix.gif) no-repeat top right;
> }

Bien vu - j'avais oubli� en effet ce "petit d�tail".

--
A+

Romer

SAM

unread,
Oct 21, 2009, 6:37:57 AM10/21/09
to
Le 10/21/09 12:18 PM, Bernd a �crit :

> Hi,
>
> J'ai fait un cadre dans lequel doit figurer en haut � droite une image.
> Le CSS donne :
> (1) background-image:url(images/croix.gif);
> background-position: top right;
> background-repeat:no-repeat;
> Et �a marche.
>
> En voulant faire la r�gle abr�g�e, j'ai �crit :
> (2) background-image:url(images/croix.gif) no-repeat top right;
> Et l� l'image n'appara�t pas.

la r�ponse est ici :
<http://www.yoyodesign.org/doc/w3c/css2/colors.html#propdef-background>

> Avez-vous une id�e o� se trouve l'erreur en (2).

L'abr�g� est 'background'

#croix {background:url(images/croix.gif) no-repeat right top;}
#croix:hover {background-image:url(images/croix2.gif)}


Application de :
<http://www.yoyodesign.org/doc/w3c/css2/colors.html#propdef-background-position>

#info h2 span { postion:absolute;top:0;right:0;width:20px;height:20px
background:url(images/croix.gif) no-repeat right center;
cursor:pointer;border:3px outset}
#info h2 span:hover {background-position:left center;border-style:inset}

'croix.gif' ressemblerait � qque chose comme : [o] [X]
et, au survol,
elle est gliss�e en fond de l'�l�ment.

<div id="info">
<h2>blabla <span></span></h2>


--
sm

Bernd

unread,
Oct 21, 2009, 12:12:53 PM10/21/09
to
SAM <stephanemor...@wanadoo.fr.invalid> wrote:

> L'abr�g� est 'background'
>
> #croix {background:url(images/croix.gif) no-repeat right top;}
> #croix:hover {background-image:url(images/croix2.gif)}

Merci - il y avait en effet une subtilit� qui a son importance.
--
A+

Romer

0 new messages