[css/html] cell hoogte klopt niet

Pagina: 1
Acties:
  • 112 views sinds 30-01-2008
  • Reageer

  • bakakaizoku
  • Registratie: Januari 2002
  • Laatst online: 18-05 19:12
Om meteen met de pagina met het probleem in huis te vallen: http://cc2656-b.deven1.ov...e_id=forums&showThread=61 (en nou even niet zeuren dat het ook in divjes kan worden gemaakt aub)

Zoals te zien is in het probleem, is dat de rechter cell niet bovenaan de table begint.

De table structuur is het volgende:

HTML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<table id="forumPosts" cellspacing="1" cellpadding="0">
    <tr>
        <td rowspan="4" class="light userInfo">
            Links, Rowspan=4
        </td>
    </tr>
    <tr>
        <td class="light data top">
            Header
        </td>
    </tr>
    <tr>
        <td class="light data txt">
            Content
        </td>
    </tr>
    <tr>
        <td class="light data bottom">
            Footer
        </td>
    </tr>
</table>


En de bijbehorende 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
#forumPosts td {
    text-align: left;
    vertical-align: top;
}

#forumPosts td.light {
    background-color: #57544b;
}

#forumPosts td.dark {
    background-color: #4a473e;
}

#forumPosts td.userInfo {
    padding: 10px;
    width: 130px;
}

#forumPosts td.userInfo a.username {
    font-weight: bold;
    text-decoration: none;
    color: #dac51c;
    font-size: 11px;
}

#forumPosts td.userInfo img.avatar {
    border: 1px solid #0f0f0f;
    width: 84px;
    height: 84px;
    margin-top: 5px;
    margin-bottom: 5px;
}

#forumPosts td.userInfo span.title {
    font-size: 9px;
    color: #c8be6a;
    font-weight: normal;
}

#forumPosts td.userInfo span.info {
    color: #c8be6a;
    font-size: 9px;
}

#forumPosts td.data {
    width: 590px;
    font-size: 10px;
    color: #dac51c;
}

#forumPosts td.txt {
    padding: 10px;
}

#forumPosts td.top {
    height: 25px;
}

#forumPosts td.bottom {
    height: 20px;
}


Nu is mijn vraag uiteraard, hoe los ik die ene pixel op :)

rm -rf ~/.signature


  • Minos111
  • Registratie: Augustus 2002
  • Laatst online: 05-03-2012
Haalt het aanzetten van border-collapse iets uit?

Cascading Stylesheet:
1
2
3
#forumPosts table {
    border-collapse: collapse;
}

  • bakakaizoku
  • Registratie: Januari 2002
  • Laatst online: 18-05 19:12
Dan verdwijnt de border helemaal..

rm -rf ~/.signature


  • OnTracK
  • Registratie: Oktober 2002
  • Laatst online: 10:55
je HTML klopt gewoon niet, je hebt een rowspan van 4, terwijl er maar 3 cellen naast staan. Bovendien gooi je gelijk een nieuwe regel ertegenaan terwijl de "test2" op gelijk hoogte moet beginnen. Je HTML moet zijn:
HTML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<table id="forumPosts" cellspacing="1" cellpadding="0">
    <tr>
        <td rowspan="3" class="light userInfo">
rowspan is 3!
            Links, Rowspan=3
        </td>
niet je tr afsluiten en een nieuwe beginnen, want je wil 
op dezelfde regel door
        <td class="light data top">
            Header
        </td>
    </tr>
    <tr>
        <td class="light data txt">
            Content
        </td>
    </tr>
    <tr>
        <td class="light data bottom">
            Footer
        </td>
    </tr>
</table>

[ Voor 95% gewijzigd door OnTracK op 02-01-2005 13:44 ]

Not everybody wins, and certainly not everybody wins all the time.
But once you get into your boat, push off and tie into your shoes.
Then you have indeed won far more than those who have never tried.


  • crisp
  • Registratie: Februari 2000
  • Nu online

crisp

Devver

Pixelated

Je tabelstructuur klopt gewoon niet:
HTML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<table id="forumPosts" cellspacing="1" cellpadding="0">
    <tr>
        <td rowspan="3" class="light userInfo">
            Links, Rowspan=4
        </td>
        <td class="light data top">
            Header
        </td>
    </tr>
    <tr>
        <td class="light data txt">
            Content
        </td>
    </tr>
    <tr>
        <td class="light data bottom">
            Footer
        </td>
    </tr>
</table>

Intentionally left blank


  • bakakaizoku
  • Registratie: Januari 2002
  • Laatst online: 18-05 19:12
Ahh... spanx, blijkbaar dus te lang geleden dat ik met tables heb gewerkt..

Ik vond het al stom dat hij alleen maar bij een rowspan van 4 enigzins deed wat ik wou, enfin, slotje ;)

rm -rf ~/.signature

Pagina: 1