Centrer une image

Fermé
masterino - 14 mars 2013 à 18:13
ideal23 Messages postés 456 Date d'inscription mercredi 30 avril 2008 Statut Membre Dernière intervention 16 mai 2014 - 16 mars 2013 à 10:40
Bonjour,





Bonjour,

Comment faire pour déplacer une image vers le centre en intervenant dans le code

Voir le code ci-dessous :

Je rappel, ce n'est pas le background que je souhaite centrer mais plutot l'image juste au dessus qui comporte des images clicqubles

(http://3.bp.blogspot.com/-9GCN1JWBVyk/UUCjT2lLW4I/AAAAAAAAATY/fwru21pehFI/s1600/Image+centrale+greenet2.jpg)

HTML


<!DOCTYPE html>
<html>
    <head>
     
        <meta charset="utf-8" />
        <link rel="stylesheet" href="style.css" />
        <title>Greenet2</title>
    </head>
  
    <body>
    <img src="http://3.bp.blogspot.com/-9GCN1JWBVyk/UUCjT2lLW4I/AAAAAAAAATY/fwru21pehFI/s1600/Image+centrale+greenet2.jpg" alt="Image centrale greenet2" usemap="#map1363191156620">
<map id="map1363191156620" name="map1363191156620">
<area shape="rect" coords="505,244,605,301" title="Tarifs" alt="Tarifs" href="http://www.rmcsport.fr/front_office/sport_player.html" target="_self">
<area shape="rect" coords="130,7,956,146" title="lavage vitres" alt="lavage vitres" href="http://www.rmcsport.fr/front_office/sport_player.html" target="_self">
<area shape="rect" coords="481,508,644,632" title="Nettoyage interieur" alt="Nettoyage interieur" href="http://www.rmcsport.fr/front_office/sport_player.html" target="_self">
<area shape="rect" coords="673,320,965,410" title="nettoyage accessoires" alt="nettoyage accessoires" href="http://www.rmcsport.fr/front_office/sport_player.html" target="_self">
<area shape="rect" coords="202,216,374,364" title="nettoyage pros" alt="nettoyage pros" href="http://www.rmcsport.fr/front_office/sport_player.html" target="_self">
<area shape="rect" coords="1094,646,1095,647" alt="HTML Map" title="HTML Map" href="http://www.html-map.com/" target="_self"></map>
  </body>
</html>



Code CSS


body
{
    background-image: url("http://2.bp.blogspot.com/-TE2d2n_j6RQ/UUChsdy0Q-I/AAAAAAAAATQ/nhaOicLcbsI/s1600/Background+greenet+2.jpg");
    background-attachment: fixed; /* Le fond restera fixe */
}
<div style="position:center; height:648px; width:1096px; image:url(http://3.bp.blogspot.com/-9GCN1JWBVyk/UUCjT2lLW4I/AAAAAAAAATY/fwru21pehFI/s1600/Image+centrale+greenet2.jpg) 0 0 center;">
<a style="position:absolute; top:244px; left:505px; width:100px; height:57px;" title="Tarifs" alt="Tarifs" href="http://www.rmcsport.fr/front_office/sport_player.html" target="_self">
</a><a style="position:absolute; top:7px; left:130px; width:826px; height:139px;" title="lavage vitres" alt="lavage vitres" href="http://www.rmcsport.fr/front_office/sport_player.html" target="_self">
</a><a style="position:absolute; top:508px; left:481px; width:163px; height:124px;" title="Nettoyage interieur" alt="Nettoyage interieur" href="http://www.rmcsport.fr/front_office/sport_player.html" target="_self">
</a><a style="position:absolute; top:320px; left:673px; width:292px; height:90px;" title="nettoyage accessoires" alt="nettoyage accessoires" href="http://www.rmcsport.fr/front_office/sport_player.html" target="_self">
</a><a style="position:absolute; top:216px; left:202px; width:172px; height:148px;" title="nettoyage pros" alt="nettoyage pros" href="http://www.rmcsport.fr/front_office/sport_player.html" target="_self">
</a><a style="position:absolute; overflow:hidden; top:646px; left:1094px; width:1px; height:1px;" title="HTML Map" alt="HTML Map" href="" target="_self"></a></div>

Merci
A voir également:

1 réponse

ideal23 Messages postés 456 Date d'inscription mercredi 30 avril 2008 Statut Membre Dernière intervention 16 mai 2014 28
16 mars 2013 à 10:40
0