Bonjour à tous,
Je débute dans les feuilles de style. J'essaye de personnaliser un champ texte mais l'identificateur "q" n'est pas pris en compte (L'image "search.png" ainsi que le style de "q" n'est pas prise en compte).
Pouvez-vous me dire ce qui cloche ?
Merci de votre aide !
----------------------
Page HTML :
----------------------------
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>index</title> <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body style="color: rgb(0, 0, 0); background-color: black;" alink="#000099" link="#000099" vlink="#990099"><span style="font-family: Adobe Arabic;"></span><img style="width: 406px; height: 87px;" alt="splendimmo" src="file:///C:/Documents%20and%20Settings/Marc/Bureau/splendimmo/Logo.png"><br> <br> <br> <br> <div style="text-align: center;"><img style="width: 400px; height: 250px;" alt="splendimmo" src="file:///C:/Documents%20and%20Settings/Marc/Bureau/splendimmo/entrance2.png"><br> <br> <div id="conteneur"> <div id="recherche"> <form method="GET" action="#" id="q"> <input type="text" size="40" name="q" value="Rechercher..." onFocus="if(this.value=='Rechercher...')this.value='';" onBlur="if(this.value=='')this.value='Rechercher...'"/> <input type="submit" value=" "/> </form> </div> <br> <div style="text-align: center;"><br> <div style="text-align: right; font-family: Arial; color: red;"><small>Webmastering</small></div> </div> </body></html>
Feuille de style :
Code css : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48 body{ text-align:center margin:0; padding:0; } #conteneur{ position:relative; width:600px; height:42px; margin:0 auto; text-align:left; background:#ffa4a4; } #recherche{ position:absolute; top:0; right:100px; width:400px; height:40px; background:url(fond.jpg) top left no-repeat; } /*Personnalisation du champ*/ #q{ margin:0 0 0 0; } #q input [type=text]{ float:left; border:0; width:200px; height:40px; background:url(search.png) top left no-repeat; color:#ff0000; padding:0 0 0 0; } #q input [type=text]:hover{ background-position:left bottom; } #q input [type=submit]{ float:right; border:0; width:100px; height:40px; background:url(search.png) top right no-repeat; } #q input [type=submit]:hover{ background-position:right bottom; }
Encore merci !
Marc







Répondre avec citation




Partager