Background, fond arrière plan en CSS
Pièces détachées Forum Contact

Background, fond arrière plan en CSS

Aide informatique Nous rachetons vos PC portables (et MAC) HS Aide informatique
Administrateur

Background, fond arrière plan en CSS

Le background en CSS se définit dans la balise Body

Code:

body
{
background-color:#00FF00;
}

Pour mettre une image, vous ferez :

Code:

body
{
background-image:url(http://www.tonsite.com/image.jpg);
}

Si vous voulez que cette image soit repetée à l'infinie :

Code:

body
{
background-image:url(http://www.tonsite.com/image.jpg);
background-repeat:repeat;
}

Si vous voulez en arrière plan que l'image soit en haut à gauche :

Code:

body
{
background-image:url(http://www.tonsite.com/image.jpg);
background-repeat: no-repeat;
background-position: top left;
}

Si vous voulez que votre arrière plan se répete à l'infinie horizontalement en haut :

Code:

body
{
background-image:url(http://www.tonsite.com/image.jpg);
background-repeat:repeat-x;
background-position: top;
}

Si vous voulez que votre background se répète à l'infinie verticalement et à gauche :

Code:

body
{
background-image:url(http://www.tonsite.com/image.jpg);
background-repeat:repeat-y;
background-position: top left;
}


  



information


Guest-21

Re: Background, fond arrière plan en CSS

Bonjour, pour ma part, cela ne fonctionne pas. Mon site est en PHP et il ya des courriels qui sont automatiquement envoyer lorsqu'il y a achat par exemple. J'aimerais mettre mon logo en haut a gauche du courriel et voici la façon dont je m'y prends: (sans les espaces du HTTP...)

body
{
background-image:url(h t t p://www.holdealer.com/auction/themes/default/LOGOHOLDEALER8.gif);
background-repeat: no-repeat;
background-position: top left;
}

lorsque le courriel est recu, on appercoit en haut, au début du texte ceci:(sans les espaces du HTTP...)


body { background-image:url(h t t p://www.holdealer.com/auction/themes/default/LOGOHOLDEALER8.gif); background-repeat: no-repeat; background-position: top left; }

Suggestions?



  



labucque

Re: Background, fond arrière plan en CSS

N'oublie pas les balises <style></style>
ex:

<style type="text/css">
<!--
body {
    background-color: #999999;
}
-->
</style></head>



  



Réponse rapide

forum Répondez et participez librement forum
Services informatiques Merci d'écrire un message de plus de 10 mots en français correct. (Tout message mal rédigé sera effacé.)

Top recherche sur le forum d'aide

Pied de page des forums

Forum : Réseau - Sécurité - Materiel
Php - Référencement - Serveurs - Divers
Windows - Internet - Logiciels - Communication
SARL Brakstar - siret : 48501380900010 RCS
203 chemin des hoirs - Bat G - 83140 Six fours
Mail : societe@brakstar.com
USA EN ES BR PO DE NL IT AR CH S CH T SU DN HU JP TE RU PL FI NO GR SE SL VN ET TH UK SL IN LH RO LE HE BG KO CZ MS CAT IR IS CR AZ