Du HTML en CSS ?!

Résolu/Fermé
monster-fr Messages postés 543 Date d'inscription dimanche 22 avril 2007 Statut Membre Dernière intervention 3 novembre 2017 - 31 oct. 2008 à 18:28
ixokal Messages postés 104 Date d'inscription vendredi 31 octobre 2008 Statut Membre Dernière intervention 12 février 2013 - 31 oct. 2008 à 19:29
Bonjour,
Voila j'ai un code que je voudrai transformé en css. Comment je peut faire?
C'est moi qui l'est tapé donc soyez indulgents.


<img
 style="position: absolute; left: 73px; width: 1249px; z-index: 1; top: 4px; height: 67px;"
 alt="" src="textures/xred1_2.jpg"><br>
<br>
<br>
<img
 style="position: absolute; width: 128px; height: 40px; top: 67px; left: 1074px;"
 alt="" src="textures/ik_gtrimh_lit1a.jpg"><br>
<img
 style="position: absolute; top: 67px; height: 5px; left: 71px; width: 1251px;"
 alt="" src="textures/qfraggel_gt_wall_4h.jpg"><br>
<img
 style="width: 128px; height: 128px; position: absolute; top: 103px; left: 198px;"
 alt="" src="textures/890.jpg"><br>
<img
 style="position: absolute; left: 325px; width: 128px; top: 107px; height: 126px;"
 alt="" src="textures/890.jpg"><br>
<img
 style="width: 128px; height: 128px; position: absolute; top: 107px; left: 580px;"
 alt="" src="textures/890.jpg"><br>
<img
 style="width: 128px; height: 128px; position: absolute; top: 107px; left: 963px;"
 alt="" src="textures/890.jpg"><br>
<br>
<img
 style="width: 128px; height: 128px; position: absolute; top: 107px; left: 708px;"
 alt="" src="textures/890.jpg"><br>
<img
 style="width: 64px; height: 32px; position: absolute; top: 72px; left: 1195px; z-index: 1;"
 alt="" src="textures/light02.jpg"><br>
<img
 style="width: 128px; height: 128px; position: absolute; top: 106px; left: 452px;"
 alt="" src="textures/890.jpg"><br>
<img
 style="width: 128px; height: 128px; position: absolute; top: 104px; left: 1186px;"
 alt="" src="textures/890.jpg"><br>
<img
 style="width: 128px; height: 128px; position: absolute; top: 105px; left: 1090px;"
 alt="" src="textures/890.jpg"><br>
<img
 style="position: absolute; left: 594px; width: 258px; top: 68px; height: 40px;"
 alt="" src="textures/qfraggel_gt_trim_h_4.jpg"><br>
<img
 style="position: absolute; top: 68px; height: 40px; left: 336px; width: 261px;"
 alt="" src="textures/qfraggel_gt_trim_h_4.jpg"><br>
<img
 style="position: absolute; top: 69px; height: 38px; left: 848px; width: 229px;"
 alt="" src="textures/qfraggel_gt_trim_h_4.jpg"><br>
<img
 style="position: absolute; width: 16px; height: 479px; top: 74px; left: 1305px;"
 alt="" src="textures/ecel_mplatelightmtl.jpg"><br>
<img
 style="position: absolute; left: 72px; width: 16px; top: 68px; height: 479px;"
 alt="" src="textures/ecel_wlight01mtl.jpg"><br>
<img
 style="width: 128px; position: absolute; left: 214px; top: 68px; height: 40px;"
 alt="" src="textures/ik_gtrimh_lit1a.jpg"><br>
<br>
<img
 style="position: absolute; width: 60px; height: 51px; top: 14px; left: 1248px;"
 alt="" src="textures/bluemetalsupport2c_1vent.jpg"><br>
<img
 style="position: absolute; left: 145px; width: 70px; z-index: 1; top: 71px; height: 36px;"
 alt="" src="textures/light02.jpg"><br>
<br>
<br>
<img
 style="position: absolute; z-index: 1; left: 73px; width: 72px; top: 70px; height: 36px;"
 alt="" src="textures/light02.jpg"><br>
<br>
<br>
<br>
<img
 style="width: 128px; position: absolute; left: 72px; top: 106px; height: 126px;"
 alt="" src="textures/890.jpg"><br>
<img
 style="width: 128px; position: absolute; left: 836px; top: 107px; height: 129px;"
 alt="" src="textures/890.jpg"><br>
<img
 style="width: 64px; height: 32px; position: absolute; top: 72px; left: 1259px; z-index: 1;"
 alt="" src="textures/light02.jpg"><br>
<br>
<br>
<img
 style="position: absolute; left: 72px; width: 16px; top: 68px; height: 479px;"
 alt="" src="textures/ecel_wlight01mtl.jpg">
A voir également:

4 réponses

webjfr Messages postés 19 Date d'inscription jeudi 30 octobre 2008 Statut Membre Dernière intervention 8 décembre 2008 12
31 oct. 2008 à 19:24
Salut

<img
 style="position: absolute; left: 73px; width: 1249px; z-index: 1; top: 4px; height: 67px;"
 alt="" src="textures/xred1_2.jpg">


retire le contenu de "style" et mets un class :
<img class="image" alt="" src="textures/xred1_2.jpg">


puis dans ton fichier css tu mets :
.image { position: absolute; left: 73px; width: 1249px; z-index: 1; top: 4px; height: 67px; }
1
nicolux Messages postés 1 Date d'inscription vendredi 31 octobre 2008 Statut Membre Dernière intervention 31 octobre 2008 1
31 oct. 2008 à 19:27
http://extranet.ipl.be/1BINWEB/document/cours/index.html

Tu dois créer un document texte en extension .css
Les règles CSS sont incluses dans un fichier séparé dont l'extension sera .css; par exemple style.css. Ce fichier est une feuille de style externe. Attention il ne faut surtout pas inclure dans le fichier .css la balise <style> qui est du HTML.
On ajoute à la page HTML un élément qui permet de faire le lien entre la page et son style qui a été enregistré dans le fichier d'extension .css
<link type="text/css" rel="stylesheet" href="style.css">
L'attribut href fait le lien avec le fichier CSS externe. rel indique au navigateur que le fichier lié est une feuille de style. type indique à ce même navigateur que le contenu du fichier lié est de type CSS.
Ensuite dans ta page html tu dois identifier tes balises html:
<img class ="imgUne" alt="tu dois mettre qqch" src="textures/xred1_2.jpg">
Puis dans ta page css tu dois définir le style
.imgUne
{
position: absolute;
left: 73px;
width: 1249px;
z-index: 1;
top: 4px;
height: 67px;"
}

Maitenant si tu veux définir toutes les images selon un certain style:
img
{
position: absolute;
left: 73px;
width: 1249px;
z-index: 1;
top: 4px;
height: 67px;"
}
1
ixokal Messages postés 104 Date d'inscription vendredi 31 octobre 2008 Statut Membre Dernière intervention 12 février 2013 5
31 oct. 2008 à 19:29
Heu tout le code je c pas trop mais tu n' a qu'a séparer le code en HTML et CSS ex:
html:
<img src="image/tnt.jpg" width="250" height="250" class="HAOU" alt="ac/dc" /> image du groupe AC/DC


CSS:

{
position: absolute;
left: 750px;
top: 300px;
} et tu dis ou elle va



Exemple qui n'a rien avoir avec le tien pour l'emplacement ^^
1
monster-fr Messages postés 543 Date d'inscription dimanche 22 avril 2007 Statut Membre Dernière intervention 3 novembre 2017 388
31 oct. 2008 à 19:18
Oui transformer se code en CSS
0