Bonjour, bonsoir
Dans une optique d’apprentissage du responsive design je suis en train de créer un site ayant un contenue en latin tout a fait abstrait et dont je ne comprend pas le traître mot.
Cependant avant de commencer a faire du code responsive, j'ai pris la mauvaise habitude de mettre des "position:relative,absolute..." sur tout les block pour pouvoir les placer sans me poser trop de question. Désormais cela me pose problème avec mon code css actuelle, alors évidement je pourrais essayer plein de chose et ça finirais pas fonctionner. Cependant je recherche une explication, voici mon problème :
Je suis persuadé qu'il n'y a pas qu'un seul problème, cependant je cherche ici a faire en sorte que lorsque la taille de l'écran est inférieur à 1024px le "aside" soit afficher en dessous du "section" et non pas par dessus.
Code : 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149 header { text-align: center; height: 200px; } header h1 { font-size: 3.5em; text-shadow:2px 2px 2px white; } nav { position:absolute; position: fixed; background-color: rgb(110, 110, 100); width: 10%; color: white; background-attachment: fixed; } nav li { font-style: italic; font-size: 12px; } nav h3 { font-style: normal; font-size: 2em; } nav a:hover { color:red; } section { width:60%; position:absolute; margin-left: 11%; } section h2 { text-align: center; } article { box-shadow: 3px 3px 2px black; } a { color:white; text-decoration: none; } aside { position:absolute; right:0px; width:28%; float:left; } aside img { position:relative; padding-bottom: 50px; margin-bottom: 0px; margin-right: 30px; margin-left: 30px; width:175px; height:50px; } aside p { position:relative; width: 200px; height: 100px; display: inline-block; margin-right: 25px; margin-left: 25px; border:3px black solid; border-radius: 10px; box-shadow: 3px 3px 2px black; } aside p:hover { box-shadow: none; } article h2:hover { height: 50px; background-image: url("http://www.pimliko.fr/img/typo_plus_vert.gif"); background-position: top right; background-repeat: no-repeat; } footer { width:200px; height:75px; top:0px; position:absolute; position:fixed; margin-left: 1px; } footer p { position:relative; background-color:rgba(150, 150, 150, 0.8); width:180px; height:50px; display: inline-block; float:left; border:1px black solid; border-radius: 10px; visibility:hidden; } footer p:hover { width:200px; height: 600px; visibility:visible; } footer p img { margin-left: 10px; width:50px; height:50px; float:left; visibility: visible; } footer p a { display: inline-block; } #menu1 { margin-top: 90px; } @media screen and (max-width: 1024px) { section { width:auto; } aside { float:none; width:auto; } }
Merci d'avance pour les réponses et l'explication de mon erreur qui d’après moi viens de tout ces "position:...;".
Partager