CSS positionering

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Gerritjan

Gerritjan

22/05/2009 20:14:00
Quote Anchor link
Hallo, ik heb een probleem.
Ik heb in mijn html document 3 wrappers, deze floating allemaal.
Maar ook buiten de wrappers floaten de elementen, dit is niet de bedoeling en ik kan de fout niet vinden.

NOTE: Het werkt met xhtml en css.

Html document:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
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
<!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" lang="en">
    <head>
        <title>Home</title>
        <style type="text/css">
            body
            {
                margin: 0px;
                background-color: #a7ccff;
            }
            #container
            {
                position: relative;
                margin: 0 auto;
                margin-top: 15px;
                width: 800px;
                height: 580px;
                border: solid 1px;
                background-color: #ffffff;
            }
            #header
            {
                position: relative;
                margin: 0 auto;
                width: 800px;
                height: 125px;
                border-bottom: solid 1px;
            
            
            }
            .pagetitle
            {
                position: relative;
                margin: 0 auto;
                height: 20px;
                width: 800px;
                border-bottom: solid 1px;
            }
            #spacing
            {
                height: 20px;
            }
            #firstw
            {
                height: 700px;
                width: 200px;
                float: left;
            }
            #navbar
            {
                width: 200px;
                height: 175px;
                border: solid 1px;
                border-left: solid 0px;
                margin-bottom: 20px;
            }
            #navheader
            {
                width: 200px;
                height: 20px;
                border-bottom: solid 1px;
                text-align: center;
            }
            #mpanel
            {
                width: 200px;
                height: 175px;
                border: solid 1px;
                border-left: solid 0px;
                margin-bottom: 20px;
            }
            #mheader
            {
                width: 200px;
                height: 20px;
                border-bottom: solid 1px;
                text-align: center;
            }
            #secondw
            {
                float: left;
                width: 300px;
                height: 700px;
            }
            #news
            {
                height: 372px;
                border: solid 1px;
                margin-left: 35px;
                width: 325px;
                float:left;
                
            }
            #newsheader
            {
                height: 20px;
                border-bottom: solid 1px;
                text-align: center;
                float: none;
            }
            #thirdw
            {
                float: right;
                width: 200px;
                height: 700px;
            
            }
            #statistics
            {
                width: 200px;
                height: 175px;
                border: solid 1px;
                border-right: solid 0px;
                margin-bottom: 20px;
            }
            #statheader
            {
                width: 200px;
                height: 20px;
                border-bottom: solid 1px;
                text-align: center;
            }
            #ads
            {
                width: 200px;
                height: 175px;
                border: solid 1px;
                border-right: solid 0px;
            }
            #adheader
            {
                width: 200px;
                height: 20px;
                border-bottom: solid 1px;
                text-align: center;
            }
            #creditbar
            {
                width: 800px;
                height: 20px;
                border-top: solid 1px;
            }
        </style>
    </head>
    <body>
        <div id="container">
            <div class="pagetitle">
            
            </div>
            <div id="header">
            
            </div>
            <div class="pagetitle">
            
            </div>
            <div id="collapse">
                <div id="spacing">
            
                </div>
                <div id="firstw">
                    <div id="navbar">
                        <div id="navheader">
                            Navigation
                        </div>
                    </div>
                    <div id="mpanel">
                        <div id="mheader">
                            Member panel
                        </div>
                    </div>
                </div>
                <div id="secondw">
                    <div id="news">
                        <div id="newsheader">
                            News
                        </div>
                    </div>
                </div>
                <div id="thirdw">
                    <div id="statistics">
                        <div id="statheader">
                            Stats
                        </div>
                    </div>
                    <div id="ads">
                        <div id="adheader">
                            ads
                        </di>
                    </div>
                </div>
                <div id="creditbar">
                    Credits to Gerritjan
                </div>
            </div>
        </div>
    </body>
</html>
Gewijzigd op 01/01/1970 01:00:00 door Gerritjan
 
PHP hulp

PHP hulp

25/11/2024 08:45:25
 
Jesper Diovo

Jesper Diovo

22/05/2009 20:16:00
Quote Anchor link
De wrapper overflow: hidden geven?
 
Gerritjan

Gerritjan

22/05/2009 20:21:00
Quote Anchor link
Welke wrapper
 
Jesper Diovo

Jesper Diovo

22/05/2009 20:32:00
Quote Anchor link
Quote:
Maar ook buiten de wrappers floaten de elementen

Neem aan dat jij dan weet welke wrappers?
 
Gerritjan

Gerritjan

22/05/2009 21:58:00
Quote Anchor link
Ik bedoel welke wrapper ik overflow: hidden moet geven, zoals ik al zei: Er zijn 3 wrappers.
Gewijzigd op 01/01/1970 01:00:00 door Gerritjan
 
Steven Hack

Steven Hack

23/05/2009 01:22:00
Quote Anchor link
Tussen de floats en het stuk waar de layout weer "normaal" is moet je een space zetten:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
.spacer {
  clear: both;
}
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.