[CSS] Cross browser probleem

Pagina: 1
Acties:

  • Mischa_NL
  • Registratie: Mei 2004
  • Laatst online: 01-02-2023
Mijn site lay-out is nu volledig met divs gemaakt.

Maar natuurlijk niet alles kan zonder tabellen.
Daar om dacht ik ik gooi er een tabel in. Maar dit gaat helemaal fout met firefox terwijl het goed gaat in internet explorer...

dit is de css

Cascading Stylesheet:
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
body {
    margin:80px;
    padding:10px;
    background:#FFF;
    background-image:url(Images/background.gif);
    color:#000;
    text-align:center;/*centre for ie5 */

    scrollbar-3dlight-color:#E55B17;
    scrollbar-arrow-color:#E55B17;
    scrollbar-darkshadow-color:#95989B;
    scrollbar-face-color:#EE9468;
    scrollbar-highlight-color:#95989B;
    scrollbar-shadow-color:#95989B;
    scrollbar-track-color:#EE9468;
}
#container {
    width:617px;
    margin:auto;/* centre for compliant browsers*/
    text-align:left;
    /*border:1px solid #000; debug border*/
}
#header {
    height:35px;
    margin-bottom:4px;
    background-image:url(Images/header.gif);
    text-align:center;
}
#left {
    margin-left:-152px;
    float:left;
    width:150px;/* this width is the same as the margin on #middle */
    height:245px;
    position:relative;
    left:-2px;/* line it up exactly without losing pressure on footer*/
    background-image:url(Images/menu.gif);
}
#middle {
    margin-left:154px;/*this is the space for the left column */
    background-image:url(Images/content.gif);
}
* html #middle {height:1%;margin-left:155px}/* combat ie's 3 pixel jog */
#menu {
    padding-left:15px;
    padding-top:7px;
}
#footer {
    clear:both;
    height:35px;
    margin-top:4px;
    background-image:url(Images/footer.gif);
    text-align:center;
}

h1,h3,p {
    margin:0px;/* centre for compliant browsers*/
    position:relative;
    font-size:15px;
    padding-right:10px;
    padding-left:8px;
}

#middle p{
    margin-top:10px;
    margin-bottom:-16px;
    padding-top:10px;
    padding-bottom:-10px;
    overflow: auto;
    height: 197px;
    width: 442px;
}


dit de code

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
<body>
    <div id="container">
        <div id="header"><!-- header --></div>
        
        <div id="middle">
            <div id="left">
                <!-- menu -->
                <div id="menu">
                    Mijn menu
                </div>
            </div>
            <h1>pagina naampje</h1>
            
            <p>
                <table style="position:relative;display:inline;">
                    <tr>
                        <td>
                            <a href="index.asp?page=Agenda&sort=Date DESC">Datum</a>
                        </td>
                    </tr>
                </table>
            </p>
            
            <br style="clear:both" />
        </div>
        
        <div id="footer"><!-- footer --></div>
    </div>
</body>


Dit is de site waar het om gaat : linkje kan nu wel weg :)

[ Voor 10% gewijzigd door Mischa_NL op 06-03-2005 17:48 ]


  • crisp
  • Registratie: Februari 2000
  • Laatst online: 14:19

crisp

Devver

Pixelated

a) wat werkt er niet?
b) waarom heb je daarvoor een table nodig?
c) waarom geef je de table een display:inline en een position:relative?

Intentionally left blank


  • Mischa_NL
  • Registratie: Mei 2004
  • Laatst online: 01-02-2023
a) de tabel lijkt niet binnen de div te komen. Het is nogal lastig uit te leggen. Als je firefox hebt kun je gewoon even kijken...

b)omdat ik data wil uitlijnen in kolommen... lijkt me iets voor een tabel. De css variant: 'display: table' werkt in IE niet anders had ik dat gebruikt!

c) geen idee. ik was wat aan het prutsen.

hier inclusief plaatje wat er in firefox gebeurt:

Afbeeldingslocatie: http://www.mischablog.nl/v2foutje.png

[ Voor 10% gewijzigd door Mischa_NL op 06-03-2005 16:56 ]


  • MNeMoNiCS
  • Registratie: Mei 2002
  • Laatst online: 16-10-2012
Vreemd, als je in FireFox op een kolom-titel klikt dan werkt ie bij mij ineens wel goed?

  • Borizz
  • Registratie: Maart 2005
  • Laatst online: 02-01 15:55
Bij mij geeft Firefox de pagina gewoon goed weer met de tabel op de juiste plaats. Ik gebruik Firefox 1.0.1.

If I can't fix it, it ain't broken.


  • Mischa_NL
  • Registratie: Mei 2004
  • Laatst online: 01-02-2023
Ik ben eruit! alle content stond binnen een <p> tag...
Deze kan geen tabellen bevatten!

Even de oplossing

dit
Cascading Stylesheet:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
h1,h3,p {
    margin:0px;/* centre for compliant browsers*/
    position:relative;
    font-size:15px;
    padding-right:10px;
    padding-left:8px;
}

#middle p{
    margin-top:10px;
    margin-bottom:-16px;
    padding-top:10px;
    padding-bottom:-10px;
    overflow: auto;
    height: 197px;
    width: 442px;
}

word
Cascading Stylesheet:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
h1,h3,p,#content {
    margin:0px;/* centre for compliant browsers*/
    position:relative;
    font-size:15px;
    padding-right:10px;
    padding-left:8px;
}

#content {
    margin-top:10px;
    margin-bottom:-16px;
    padding-top:10px;
    padding-bottom:-10px;
    overflow: auto;
    height: 197px;
    width: 442px;
}


dit
HTML:
1
2
3
4
5
6
7
8
9
<p>
    <table style="position:relative;display:inline;">
        <tr>
            <td>
                <a href="index.asp?page=Agenda&sort=Date DESC">Datum</a>
            </td>
        </tr>
    </table>
</p>

word
HTML:
1
2
3
4
5
6
7
8
9
<div id="content">
    <table style="position:relative;display:inline;">
        <tr>
            <td>
                <a href="index.asp?page=Agenda&sort=Date DESC">Datum</a>
            </td>
        </tr>
    </table>
</div>


Damn dit heeft me echt een hele dag gekost om uit te vinden.
Bedankt voor de moeite maar weer. :)

  • crisp
  • Registratie: Februari 2000
  • Laatst online: 14:19

crisp

Devver

Pixelated

dat had je met de validator ook wel kunnen vinden lijkt me (maar ik keek er ook overheen) ;)

Intentionally left blank

Pagina: 1