Hey,
Ik wil graag dat de footer onderaan de pagina komt te staan en mee beweegt wanneer de content langer is dan de viewport van de browser. Dus wanneer de tekst korter is dan de viewport dat dan de footer onderaan de viewport komt te staan en als de tekst langer is dan de viewport dat ie dan mee gaat met de tekst.
Nu heb ik onderstaande code en deze werkt perfect in IE, maar in Firefox komt de footer niet onderaan de viewport te staan als de tekst korter is dan de viewport (de footer beweegt wel mee met de content).
Weet iemand wat ik fout doe?
(ik heb de html tags enzo even weggelaten)
Ik wil graag dat de footer onderaan de pagina komt te staan en mee beweegt wanneer de content langer is dan de viewport van de browser. Dus wanneer de tekst korter is dan de viewport dat dan de footer onderaan de viewport komt te staan en als de tekst langer is dan de viewport dat ie dan mee gaat met de tekst.
Nu heb ik onderstaande code en deze werkt perfect in IE, maar in Firefox komt de footer niet onderaan de viewport te staan als de tekst korter is dan de viewport (de footer beweegt wel mee met de content).
Weet iemand wat ik fout doe?
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
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
| <html>
<head>
<title></title>
<style type="text/css">
html {
width: 100%;
height: 100%;
}
html>body, html>body #holder {
height: auto;
}
body {
position: relative;
min-height: 100%;
margin: 0;
padding: 0;
background: url(images/achtergrond2.jpg) repeat-y 50% 0;
}
#holder {
min-height: 100%;
width: 748px;
position: relative;
margin: 0 auto;
height: 100%;
}
#header {
height: 71px;
background: url(images/index_01.jpg) no-repeat;
border: none;
width: 100%;
}
#nav {
width: 186px;
float: left;
padding-bottom: 3em;
height: auto;
}
#content {
margin-left: 191px;
margin-top: 60px;
padding-bottom: 3em;
height: auto;
background: url(images/index_12.jpg) no-repeat;
background-position: top right;
}
#balkonder3 {
position: absolute;
top: 109px;
left: 186px;
width: 562px;
height: 23px;
background: url(images/index_10.jpg) no-repeat;
}
#footer {
clear: both;
width: 748px;
height: 20px;
background-color: gray;
position: absolute;
bottom: 0;
left: 0;
border: none;
}
#navigatie {
position: absolute;
top: 71px;
left: 0px;
width: 259px;
height: 18px;
background: url(images/index_02.jpg) no-repeat;
}
#home {
position: absolute;
top: 71px;
left: 259px;
width: 74px;
height: 18px;
}
#informatie {
position: absolute;
top: 71px;
left: 333px;
width: 109px;
height: 18px;
}
#diensten {
position: absolute;
top: 71px;
left: 442px;
width: 94px;
height: 18px;
}
#portfolio {
position: absolute;
top: 71px;
left: 536px;
width: 104px;
height: 18px;
}
#contact {
position: absolute;
top: 71px;
left: 640px;
width: 108px;
height: 18px;
}
#balkonder {
position: absolute;
top: 89px;
left: 0px;
width: 748px;
height: 20px;
background: url(images/index_08.jpg) no-repeat;
}
#balkonder2 {
position: absolute;
top: 109px;
left: 0px;
width: 186px;
height: 34px;
background: url(images/index_09.jpg) no-repeat;
}
#klantenlogin {
position: absolute;
top: 143px;
left: 0px;
width: 186px;
height: 114px;
background: url(images/index_13.jpg) no-repeat;
}
#headlines {
position: absolute;
top: 257px;
left: 0px;
width: 186px;
height: 334px;
font-family: Verdana, Century Gothic, Arial;
font-size: 10px;
color: #5E5E5E;
background: url(images/index_14.jpg) no-repeat;
}
#nav p, #content p {
margin: 0px 10px 10px 10px;
font-family: Verdana, Century Gothic, Arial;
font-size: 10px;
color: #000000;
line-height: 155%;
width: 365px;
}
#nav ul {margin-left: 0; padding-left: 0;}
#nav li {margin: 0 1em 0 2em;}
</style>
<!--[if lt IE 7]>
<style type="text/css"> body { height: 100%; } </style>
<![endif]-->
</head>
<body>
<div id="holder">
<div id="header">
</div>
<div id="navigatie">
</div>
<div id="home">
</div>
<div id="informatie">
</div>
<div id="diensten">
</div>
<div id="portfolio">
</div>
<div id="contact">
</div>
<div id="balkonder">
</div>
<div id="nav">
<div id="balkonder2">
</div>
<div id="klantenlogin">
</div>
<div id="headlines">
</div>
</div>
<div id="balkonder3">
</div>
<div id="content">
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam convallis est sed sapien. Nunc viverra dolor. Quisque luctus pulvinar arcu. Phasellus condimentum lorem nec purus. Curabitur sagittis, nisl nec ullamcorper tempor, enim arcu venenatis tellus, id accumsan magna lacus sed sem. Nulla facilisi. Suspendisse et erat. Suspendisse potenti. Phasellus lacus. Praesent est. Quisque dolor massa, sagittis sit amet, porttitor et, semper at, lacus. Sed facilisis arcu venenatis nisi aliquam laoreet. Quisque euismod dolor eu urna. Cras varius libero vitae nulla. Sed vitae elit vel tellus ullamcorper consectetuer. Vestibulum vitae purus at turpis auctor rutrum.
</p>
</div>
<div id="footer">
</div>
</div>
</body>
</html> |
(ik heb de html tags enzo even weggelaten)
[ Voor 15% gewijzigd door Verwijderd op 21-01-2006 12:36 ]
