[html] layer gedragen als tabel

Pagina: 1
Acties:

  • Daniel304
  • Registratie: December 2000
  • Laatst online: 10-05 14:24
ik heb een tabel die ik wil op zetten naar verschillende layers.
echter ik werk met een box van een bepaalde grote waarin sommige cellen een vaste grote hebben. een simpel voorbeeld.
code:
1
2
3
4
5
6
7
<table border="1" width="100" id="table1">
    <tr>
        <td width="12">&nbsp;</td>
        <td>&nbsp;</td>
        <td width="12">&nbsp;</td>
    </tr>
</table>

nu blijft de middelste cel gelijk -24 pixels aan de totale grote. Hoe krijg je dit gedrag in layers ?

  • Res-q
  • Registratie: December 2002
  • Laatst online: 30-04 15:18

Res-q

Redder in nood?

div'jes maken en die allemaal een vaste breedte meegeven, en vervolgens met margin-left en right uitlijnen... Die div'jes vervolgens in 1 div-container hangen met 100px breedte :)

en zo is het voorspeld!


  • Daniel304
  • Registratie: December 2000
  • Laatst online: 10-05 14:24
Het Werkt. Type foutje.
Bedankt

html
code:
1
2
3
4
5
<div class="BrownBox" id="Login">
      <div class="cross">[img]"../images/xmarks.gif"[/img]</div>
      <div class="message"><!-- --></div>
      <div class="pin">[img]"../images/marks.gif"[/img]</div>
</div>

css
code:
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
<!-- container -->
div.BrownBox{
  position          : absolute;
  left              : 20px;
  top               : 100px;
  width             : 300px;
  height            : 200px;
  z-index           : 1;
  border-top        : 1px solid #D4BC94;
  border-left       : 1px solid #D4BC94;
  border-bottom     : 1px solid #68502C;
  border-right      : 1px solid #68502C;
  background-color  : #98845C;
}

<!-- vierkant met vaste breedte -->
div.BrownBox .cross{
  position          : absolute;
  left              : -1px;
  top               : -1px;
  width             : 12px;
  height            : 12px;
  border-top        : 1px solid #D4BC94;
  border-left       : 1px solid #D4BC94;
  border-bottom     : 1px solid #68502C;
  border-right      : 1px solid #68502C;
}

<!-- vierkant met vaste breedte -->
div.BrownBox .pin{
  position          : absolute;
  right             : -1px;
  top               : -1px;
  width             : 12px;
  height            : 12px;
  border-top        : 1px solid #D4BC94;
  border-left       : 1px solid #D4BC94;
  border-bottom     : 1px solid #68502C;
  border-right      : 1px solid #68502C;
}

<!-- variabele breedte -->
div.BrownBox .message{
  margin-left       : 12px;
  margin-right      : 12px;
  top               : -1px;
  height            : 12px;
  border-top        : 2px ridge #D4BC94;
  border-left       : 2px ridge #D4BC94;
  border-bottom     : 2px ridge #D4BC94;
  border-right      : 2px ridge #D4BC94;
}

; vergeten.

[ Voor 43% gewijzigd door Daniel304 op 07-03-2005 14:59 ]


  • BtM909
  • Registratie: Juni 2000
  • Niet online

BtM909

Watch out Guys...

Jij wilt volgens mij:

Cascading Stylesheet:
1
max-width: 400px; 

gebruiken. Het werkt uiteraard niet in IE ;)

Ace of Base vs Charli XCX - All That She Boom Claps (RMT) | Clean Bandit vs Galantis - I'd Rather Be You (RMT)
You've moved up on my notch-list. You have 1 notch
I have a black belt in Kung Flu.