Ik heb een probleem waar ik niet uitkom zonder css hacks toe te passen. Wanneer je de onderstaande code opslaat in een html bestand en bekijkt in zowel IE als in FF zal je zien dat beide browsers de marge van de div in de #header div op een andere manier weergeeft.
Wie kan mij de juiste oplossing geven zonder css hacks toe te passen.
Wie kan mij de juiste oplossing geven zonder css hacks toe te passen.
HTML:
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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Tester</title> <style type="text/css"> body { margin-top:0px; color:#FFFFFF; background-color:#000000; font: 11px verdana, tahoma, arial, sans-serif; background-image:url(images/Concept5.jpg); background-repeat:repeat; } .mainbox { background-color:#000000; color: #FFFFFF; width:770px; margin-left: auto; margin-right: auto; } #header { width:770px; height:431px; color:#CC0000; background-image: url(images/Header.jpg); background-position:top; background-color: #FFFFFF; } </style> </head> <body> <div class="mainbox"> <div id="header"> <div style="margin-top:20px"> deze marge moet plaats vinden binnen de div header niet daar buiten. IE doet dit wel goed FF niet. </div> </div> </div> </body> </html> |
[ Voor 17% gewijzigd door aex351 op 09-04-2006 17:26 ]
< dit stukje webruimte is te huur >