Forum » Client-Side scripting » CSS Fout in FF
Berichten: 210
avatar
Offline Stuur privebericht
Hallo allemaal,

Ik heb een probleem..

Ik ben bezig met een site en in IE ziet alles er netjes uit maar in alle andere browsers gaat er iets fout met de divs.

CSS:
Code | Selecteer Alles
minimaliseren
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
#pagina_totaal {
    
heightauto;
    
width800px;
}
#header {
    
background-imageurl(afbeeldingen/header.gif);
    
height234px;
    
width800px;
}
#menu_kop {
    
background-imageurl(afbeeldingen/menu_kop.gif);
    
floatleft;
    
height60px;
    
width217px;
}
#content_kop {
    
background-imageurl(afbeeldingen/content_kop.gif);
    
floatright;
    
height60px;
    
width583px;
    
clearright;
}
#menu {
    
background-imageurl(afbeeldingen/menu.gif);
    
background-repeatrepeat-y;
    
floatleft;
    
height500px;
    
padding-right5px;
    
width217px;
    
text-alignleft;
    
padding-left20px;
}
#content {
    
background-imageurl(afbeeldingen/content.gif);
    
background-repeatrepeat-y;
    
background-positionright;
    
background-color#dcdcdc;
    
floatright;
    
padding-right5px;
    
height500px;
    
width573px;
    
overflowauto;
    
text-alignleft;
    
margin-right10px;
}
#menu_voet {
    
background-imageurl(afbeeldingen/menu_voet.gif);
    
floatleft;
    
height25px;
    
width217px;
}
#content_voet {
    
background-imageurl(afbeeldingen/content_voet.gif);
    
floatright;
    
height25px;
    
width583px;
}
#clear {
    
clearboth;
}
#copyright {
    
background-imageurl(afbeeldingen/copyright.jpg);
    
background-repeatno-repeat;
    
background-positioncenter;
    
clearboth;
    
height31px;
    
width800px;
}


Index.php:
Code | Selecteer Alles
minimaliseren
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
<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Knuffels uit Nederland</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<center>
<div class="pagina_totaal" id="pagina_totaal">
<div class="header" id="header"></div>

<div class="menu_kop" id="menu_kop"><h1>Menu</h1></div>
<div class="content_kop" id="content_kop"><h1>
<?PHP
if (! isset($_GET['p'])) { 
    
$_GET['p'] = 'home'

  
      
$uitleg mysql_fetch_assoc(mysql_query("SELECT * FROM uitleg WHERE pagina = '" $_GET['p'] . "'"));
echo 
$uitleg['titel'];
 
?>
</h1></div>
<div class="clear" id="clear"></div>
<div class="menu" id="menu"><table cellpadding="0" border="0">
<?PHP
$menu 
mysql_query("SELECT * FROM menu");
    while(
$menus mysql_fetch_array($menuMYSQL_ASSOC)){
echo 
'<tr><td width="25%"><a href="'.$menus['url'].'"><img src="afbeeldingen/menu/'.$menus['afbeelding'].'" border="0"></a></td> <td><a href="'.$menus['url'].'">'.$menus['titel'].'</a></td><tr>';
    }
    echo 
'</table>
</div>
<div class="content" id="content">'
;
if (isset(
$_GET['p'])) { 
    if (! 
file_exists($_GET['p'] . '.php')) { 
        
$_GET['p'] = 'home'
    } 
    Include_Once (
$_GET['p'] . '.php'); 

echo 
'</div>
<div class="clear" id="clear"></div>
<div class="menu_voet" id="menu_voet"></div>
<div class="content_voet" id="content_voet"></div>
<div class="copyright" id="copyright"></div>
</div>
</center>
</body>
</html>


Wat doe ik fout?

Voorbeeld:
http://knuffelsuitnederland.cz.cc

Met vriendelijke groet,
Blackboss
09-03-2011 22:33
Dit topic is 284 keer bekeken door 47 verschillende leden
Reacties op: "CSS Fout in FF"
1
thexeroxprojects.be
Berichten: 352
avatar
Offline Stuur privébericht
Heb je een voorbeeld online om de fout te laten zien?
09-03-2011 22:59
Berichten: 210
avatar
Offline Stuur privébericht
10-03-2011 08:45
Designer [GFXSky]
Berichten: 36
avatar
Offline Stuur privébericht
Beste,

Ik heb gekeken op uw website en gezien wat de fout is.
De breedte was telang. hieronder ziet u de goede CSS Code.
vervang deze door het uwe.
Code | Selecteer Alles
minimaliseren
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
200
201
202
203
204
205
206
207
208
209
body {

    
background-color#78c934;

    
background-imageurl(afbeeldingen/achtergrond.jpg);

    
background-positionright bottom;

    
background-repeatno-repeat;

    
font14px VerdanaHelveticaTahoma;

}

#pagina_totaal {

    
heightauto;

    
width800px;

}

#header {

    
background-imageurl(afbeeldingen/header.gif);

    
height234px;

    
width800px;

}

#menu_kop {

    
background-imageurl(afbeeldingen/menu_kop.gif);

    
padding-top12px;

    
floatleft;

    
height60px;

    
width217px;

}

/***Edited by GFXSky***/

#content_kop {

    
background-imageurl(afbeeldingen/content_kop.gif);

    
padding-top12px;

    
floatright;

    
height60px;

    
width583px;

    
clearright;

}

#menu {

    
background-imageurl(afbeeldingen/menu.gif);

    
background-repeatrepeat-y;

    
floatleft;

    
height500px;

    
padding-right5px;

    
width190px;

    
text-alignleft;

    
padding-left20px;

}

#content {

    
background-imageurl(afbeeldingen/content.gif);

    
background-repeatrepeat-y;

    
background-positionright;

    
background-color#dcdcdc;

    
floatright;

    
padding-right5px;

    
height500px;

    
width570px;

    
overflowauto;

    
text-alignleft;

    
margin-right10px;

}

#menu_voet {

    
background-imageurl(afbeeldingen/menu_voet.gif);

    
floatleft;

    
height25px;

    
width217px;

}

#content_voet {

    
background-imageurl(afbeeldingen/content_voet.gif);

    
floatright;

    
height25px;

    
width583px;

}

#clear {

    
clearboth;

}

#copyright {

    
background-imageurl(afbeeldingen/copyright.jpg);

    
background-repeatno-repeat;

    
background-positioncenter;

    
clearboth;

    
height31px;

    
width800px;

}

hr {

    
width520px;

    
color#000;

    
background-color#000;

    
height1px;

    
border0px;

}

h1 {

    
font-size22px;

    
font-weightbold;

}

a:link {

    
text-decorationnone;

    
color#000;

}

a:visited {

    
text-decorationnone;

    
color#000;

}

a:hover {

    
text-decorationunderline;

    
color#000;

}

a:active {

    
text-decorationnone;

    
color#000;

}



Mvg,
10-03-2011 17:35
Crime-ware dot nl
Berichten: 774
avatar
Offline Stuur privébericht
kan dit?

echo </div>
<div class="clear" id="clear"></div>
<div class="menu_voet" id="menu_voet"></div>
<div class="content_voet" id="content_voet"></div>
<div class="copyright" id="copyright"></div>
</div>

dit moet toch tussen echo '';
?
10-03-2011 19:07
Berichten: 210
avatar
Offline Stuur privébericht
@ eeyk: Ik heb het in het script wel tussen echo ''; staan..

@ TopSecret: Als je nu de pagina in IE opent dan klopt het daar weer niet. Dat probleem had ik ook al de hele tijd.

Edit:
Ik heb het nu opgelost door:
Code | Selecteer Alles
minimaliseren
1
2
3
<!--[if IE]>
<
div class="cspec" id="cspec"></div>
<![endif] -->

en
Code | Selecteer Alles
minimaliseren
1
2
3
4
5
6
#cspec {
    
background-color#dcdcdc;
    
floatleft;
    
width30px;
    
height500px;
}


Aan het script toe te voegen..

Nu heb ik alleen het probleem dat er bij IE op een paar pagina's een . onder de content komt testaan.

Terwijl er nergens een . in me script voor komt en als je selecteerd lijkt het wel de laatste punt uit de content.

Hoe kan ik dit oplossen?

P.S: Er zijn wel veel meer dingen die er in IE anders uitzien.

Nieuwe reactie samengevoegd met originele reactie op 13.03.11 21:44:31:
BUMP
10-03-2011 21:33
Reageer op: "CSS Fout in FF"
1
Je kan niet reageren omdat je niet bent ingelogd. Inloggen of Aanmelden