Salut, j'ai un petit problème.
Quand je change la résolution de mon browser mon texte ce déplace. Comment faire pour que le texte reste au même endroit sous différente résolution?
Merci
Version imprimable
Salut, j'ai un petit problème.
Quand je change la résolution de mon browser mon texte ce déplace. Comment faire pour que le texte reste au même endroit sous différente résolution?
Merci
ça depend :)
tu peux utiliser le margin:auto.
avec le code HTML et CSS, on pourrait peut être y voir plus clair. Tu peux le mettre ?
Code:
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 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtmll-transitional.dtd"> <html> <head> <style type="text/css"> body {background-color:black;} img{border-style: none;text-decoration: none;} a:visited, a:active{color:black;} </style> <title>Welcome</title> </head> <body> <div align="center"> <a href="donate.html"><img src="icons/contribute.png"/></a> <a href="emulators.html"><img src="icons/emulators.png"/></a> <a href="selection.html"><img src="icons/roms.png"/></a> <a href="support.html"><img src="icons/contact.png"/></a> <a href="tutorial.html"><img src="icons/tutorial.png"/></a> </div> </body> </html>
En fait je ne vois pas trop le problème. Quand je redimensionne la fenêtre du navigateur, les liens sont toujours centrés...
Dis en un peu plus
http://i.picasion.com/pic40/b2a800da...b8c43a2c0b.gif
Vous voyez les icons qui bougent? Bah c'est ça mon problème, comment faire pour qu'il reste au même endroit quand je redimensionne la fenêtre?
d'accord donc oui , il faut définir une largeur à ton div et un margin :
J'ai enlevé le align="center " de ton div et l'ai mis dans la css.Code:
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 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtmll-transitional.dtd"> <html> <head> <style type="text/css"> body {background-color:black; color:#fff;} img{border-style: none;text-decoration: none;} a:visited, a:active{color:black;} div.wrapper{ text-align:center; width:900px; margin:0 auto; } </style> <title>Welcome</title> </head> <body> <div class="wrapper"> <a href="donate.html"><img src="icons/contribute.png"/></a> <a href="emulators.html"><img src="icons/emulators.png"/></a> <a href="selection.html"><img src="icons/roms.png"/></a> <a href="support.html"><img src="icons/contact.png"/></a> <a href="tutorial.html"><img src="icons/tutorial.png"/></a> </div> </body> </html>
J'ai mis une largeur à titre d'exemple mais à toi de mettre la bonne en fonction du rendu de ta page avec les boutons
Merci :mrgreen: