Rekken
Hallo, ik wil dat de achtergrond met de div tags meerekken.
Dit lukt prima, maar de kleur rekt niet mee.
Wat moet ik doen?
Code:
Dit lukt prima, maar de kleur rekt niet mee.
Wat moet ik doen?
Code:
Zet er eens bij height: auto;
Weet niet of het helpt
Weet niet of het helpt
<div id="content">
// Hier al je content
<div style="clear:both"></div>
</div>
En nu zal de content wel mee moeten gaan ;)
// Hier al je content
<div style="clear:both"></div>
</div>
En nu zal de content wel mee moeten gaan ;)
ok, even ter verduidelijking van Han zijn post.
clear: both, zorgt ervoor dat de de div pas achter alle content gesloten wordt. Bij jou liep de content eigenlijk uit de div, waardoor je dus het gevoel krijgt dat de achtergrondkleur niet meerekt.
clear: both, zorgt ervoor dat de de div pas achter alle content gesloten wordt. Bij jou liep de content eigenlijk uit de div, waardoor je dus het gevoel krijgt dat de achtergrondkleur niet meerekt.
Maar volgens mij werkt het niet als je de div float.
Of zeg ik nu iets onwaars?
Of zeg ik nu iets onwaars?
Nog nooit problemen mee gehad eigenlijk.
float of niet, het is op het object zelf, dus zou geen poblemen moeten opleveren
Clear: Both; verwijderen werkt niet, het rekt niet mee.
Ik zal je de beide pagina's laten zien.
Style.css
index.htm
Ik zal je de beide pagina's laten zien.
Style.css
Code (php)
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
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
body
{
margin: 0px;
}
#container
{
position: relative;
margin: 0px auto;
margin-top: 20px;
width: 700px;
}
#container_top
{
width: 700px;
height: 40px;
text-align: center;
background-image: url('img/container_top.png');
background-repeat: no-repeat;
}
#container_header
{
width: 700px;
height: 100px;
background-image: url(img/container_header.png);
background-repeat: no-repeat;
}
#container_mid
{
width: 700px;
height: 20px;
background-image: url('img/container_mid.png');
background-repeat: no-repeat;
}
#navbar
{
width: 700px;
height: 60px;
text-align: center;
background-color: #ffba00;
margin: 0px;
}
.navbar_btn
{
margin: 0px;
width: 100px;
height: 34px;
text-align: center;
background-image: url('img/navbar_btn.png');
background-repeat: no-repeat;
border-left: solid #ffba00 5px;
border-right: solid #ffba00 5px;
color: #FFFFFF;
font-size: 14px;
}
table
{
border-spacing: 0px;
position: relative;
margin: 0px auto;
}
#content
{
height: 400px;
height: auto !important;
min-height: 400px;
width: 700px;
background-image: url('img/contentbg.png');
background-repeat: repeat;
padding-bottom: 10px;
}
.bar1
{
margin-bottom: 10px;
}
.bar_header
{
width: 175px;
height: 40px;
background-image: url('img/bar_header.png');
background-repeat: no-repeat;
color: #FF6600;
font-size: 16px;
text-align: center;
}
.bar_content
{
width: 173px;
min-height: 118px;
background-color: #FFFFFF;
}
.bar_bottom
{
width: 173px;
min-height: 20px;
background-image: url('img/bar_bottom.png');
}
#collapse1
{
width: 175px;
margin-left: 15px;
margin-right: 15px;
float: left;
}
#collapse2
{
width: 225px;
float: left;
margin-top: -49px;
margin-left: 32px;
margin-right: 15px;
}
#bar2
{
margin-top: 50px;
margin-bottom: 10px;
}
#page_header
{
width: 225px;
height: 40px;
background-image: url('img/page_header.png');
background-repeat: no-repeat;
color: #FF6600;
font-size: 16px;
text-align: center;
}
#page_content
{
width: 225px;
min-height: 302px;
background-color: #FFFFFF;
}
#page_bottom
{
width: 225px;
height: 23px;
background-image: url('img/page_bottom.png');
}
#collapse3
{
width: 175px;
margin-left: 15px;
margin-right: 15px;
float: right;
}
.bar3
{
margin-bottom: 10px;
}
#container_bottom
{
width: 700px;
height: 23px;
clear: both;
background-image: url('img/container_bottom.png');
}
{
margin: 0px;
}
#container
{
position: relative;
margin: 0px auto;
margin-top: 20px;
width: 700px;
}
#container_top
{
width: 700px;
height: 40px;
text-align: center;
background-image: url('img/container_top.png');
background-repeat: no-repeat;
}
#container_header
{
width: 700px;
height: 100px;
background-image: url(img/container_header.png);
background-repeat: no-repeat;
}
#container_mid
{
width: 700px;
height: 20px;
background-image: url('img/container_mid.png');
background-repeat: no-repeat;
}
#navbar
{
width: 700px;
height: 60px;
text-align: center;
background-color: #ffba00;
margin: 0px;
}
.navbar_btn
{
margin: 0px;
width: 100px;
height: 34px;
text-align: center;
background-image: url('img/navbar_btn.png');
background-repeat: no-repeat;
border-left: solid #ffba00 5px;
border-right: solid #ffba00 5px;
color: #FFFFFF;
font-size: 14px;
}
table
{
border-spacing: 0px;
position: relative;
margin: 0px auto;
}
#content
{
height: 400px;
height: auto !important;
min-height: 400px;
width: 700px;
background-image: url('img/contentbg.png');
background-repeat: repeat;
padding-bottom: 10px;
}
.bar1
{
margin-bottom: 10px;
}
.bar_header
{
width: 175px;
height: 40px;
background-image: url('img/bar_header.png');
background-repeat: no-repeat;
color: #FF6600;
font-size: 16px;
text-align: center;
}
.bar_content
{
width: 173px;
min-height: 118px;
background-color: #FFFFFF;
}
.bar_bottom
{
width: 173px;
min-height: 20px;
background-image: url('img/bar_bottom.png');
}
#collapse1
{
width: 175px;
margin-left: 15px;
margin-right: 15px;
float: left;
}
#collapse2
{
width: 225px;
float: left;
margin-top: -49px;
margin-left: 32px;
margin-right: 15px;
}
#bar2
{
margin-top: 50px;
margin-bottom: 10px;
}
#page_header
{
width: 225px;
height: 40px;
background-image: url('img/page_header.png');
background-repeat: no-repeat;
color: #FF6600;
font-size: 16px;
text-align: center;
}
#page_content
{
width: 225px;
min-height: 302px;
background-color: #FFFFFF;
}
#page_bottom
{
width: 225px;
height: 23px;
background-image: url('img/page_bottom.png');
}
#collapse3
{
width: 175px;
margin-left: 15px;
margin-right: 15px;
float: right;
}
.bar3
{
margin-bottom: 10px;
}
#container_bottom
{
width: 700px;
height: 23px;
clear: both;
background-image: url('img/container_bottom.png');
}
index.htm
Code (php)
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
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
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Habbo page</title>
<link rel="shortcut icon" href="img/favicon.ico">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<div id="container">
<div id="container_top">
</div>
<div id="container_header">
</div>
<div id="container_mid">
</div>
<div id="navbar">
<table>
<tr>
<td class="navbar_btn"><b>Link</b></td>
<td class="navbar_btn"><b>Link</b></td>
<td class="navbar_btn"><b>Link</b></td>
<td class="navbar_btn"><b>Link</b></td>
<td class="navbar_btn"><b>Link</b></td>
<td class="navbar_btn"><b>Link</b></td>
</tr>
</table>
</div>
<div id="content">
<div id="collapse1">
<div class="bar1">
<div class="bar_header">
<b>Content</b>
</div>
<div class="bar_content">
</div>
<div class="bar_bottom">
</div>
</div>
<div class="bar1">
<div class="bar_header">
<b>Content</b>
</div>
<div class="bar_content">
</div>
<div class="bar_bottom">
</div>
</div>
</div>
<div id="collapse2">
<div id="bar2">
<div id="page_header">
<b>Content</b>
</div>
<div id="page_content">
</div>
<div id="page_bottom">
</div>
</div>
</div>
<div id="collapse3">
<div class="bar3">
<div class="bar_header">
<b>Content</b>
</div>
<div class="bar_content">
</div>
<div class="bar_bottom">
</div>
</div>
<div class="bar3">
<div class="bar_header">
<b>Content</b>
</div>
<div class="bar_content">
lala<p>lala<p>lala<p>lala<p>lala<p>lala<p>lala<p>lala<p>vlala<p>lala<p>lala<p>
</div>
<div class="bar_bottom">
</div>
</div>
</div>
</div>
<div id="container_bottom">
</div>
</div>
</body>
</html>
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Habbo page</title>
<link rel="shortcut icon" href="img/favicon.ico">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<div id="container">
<div id="container_top">
</div>
<div id="container_header">
</div>
<div id="container_mid">
</div>
<div id="navbar">
<table>
<tr>
<td class="navbar_btn"><b>Link</b></td>
<td class="navbar_btn"><b>Link</b></td>
<td class="navbar_btn"><b>Link</b></td>
<td class="navbar_btn"><b>Link</b></td>
<td class="navbar_btn"><b>Link</b></td>
<td class="navbar_btn"><b>Link</b></td>
</tr>
</table>
</div>
<div id="content">
<div id="collapse1">
<div class="bar1">
<div class="bar_header">
<b>Content</b>
</div>
<div class="bar_content">
</div>
<div class="bar_bottom">
</div>
</div>
<div class="bar1">
<div class="bar_header">
<b>Content</b>
</div>
<div class="bar_content">
</div>
<div class="bar_bottom">
</div>
</div>
</div>
<div id="collapse2">
<div id="bar2">
<div id="page_header">
<b>Content</b>
</div>
<div id="page_content">
</div>
<div id="page_bottom">
</div>
</div>
</div>
<div id="collapse3">
<div class="bar3">
<div class="bar_header">
<b>Content</b>
</div>
<div class="bar_content">
</div>
<div class="bar_bottom">
</div>
</div>
<div class="bar3">
<div class="bar_header">
<b>Content</b>
</div>
<div class="bar_content">
lala<p>lala<p>lala<p>lala<p>lala<p>lala<p>lala<p>lala<p>vlala<p>lala<p>lala<p>
</div>
<div class="bar_bottom">
</div>
</div>
</div>
</div>
<div id="container_bottom">
</div>
</div>
</body>
</html>




