Vraagje over DIV's

Pagina: 1
Acties:

  • Spasm
  • Registratie: Juni 2001
  • Laatst online: 06:42
Hallo, ik ben aan het proberen om ook zoals zovelen over te stappen van tabels naar div's om een internetpagina te maken. Ik heb wat tutorials gevolgd, en het meeste is wel redelijk duidelijk, maar sommige dingen snap ik nog niet helemaal.

Boven onderstaande code zou ik graag een banner maken, maar ik heb geen idee hoe dit werkt.
Ik heb geprobeerd er gewoon een div boven te zetten, met breedte 100%, maar deze wordt opgeslokt door de rest. Verder snap ik niet helemaal waarom er in de html eerst begonnen moet worden de content, en niet met de links.

Kan iemand mij helderheid verschaffen ?


html

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
53
54
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
    <title>Three Columns - Flanking Menus</title>
    <style type="text/css" media="screen">@import "got_layout3.css";</style>
    
</head>

<body>
<div class="content">
    <h1>Content</h1>
    <p>Blaat</p>

    
</div>

<div class="content">
    <h2>Nog meer blaat</h2>
    <p>Blaatblaterdeblaatblaat</p>

</div>

<div class="content">
    <p>Je raad het al !! Nog meer geblaat !</p>
</div>

<div id="navAlpha">
    <h2>Links</h2>

    <p>
        
        <a href="" title="">Nep link O,5</a><br>
        <a href="" title="">Nep link 1</a><br>
        <a href="" title="">Nep link 2</a><br>
        <a href="" title="">Nep link 3</a><br>
        <a href="" title="">Nep link 4</a><br>
    </p>
</div>


<div id="navBeta">

    <h2>Rechts</h2>
    <p>Bladibladi bla nag nag nag.<br>
    Nog meer onzin.
    </p>
</div>

<!-- BlueRobot was here. -->

</body>
</html>


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
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
body {
    color:#333;
    background-color:white;
    margin:20px;
    padding:0px;
    font:11px verdana, arial, helvetica, sans-serif;
    }
h1 {
    margin:0px 0px 15px 0px;
    padding:0px;
    font-size:28px;
    font-weight:900;
    color:#ccc;
    }
h2 {
    font:bold 12px/14px verdana, arial, helvetica, sans-serif;
    margin:0px 0px 5px 0px;
    padding:0px;
    }
p {
    font:11px/20px verdana, arial, helvetica, sans-serif;
    margin:0px 0px 16px 0px;
    padding:0px;
    }
.Content>p {margin:0px;}
.Content>p+p {text-indent:30px;}

a {
    color:#09c;
    font-size:11px;
    font-family:verdana, arial, helvetica, sans-serif;
    font-weight:600;
    text-decoration:none;
    }
a:link {color:#09c;}
a:visited {color:#07a;}
a:hover {background-color:#eee;}
  
/* All the content boxes belong to the content class. */
.content {
    position:relative; /* Position is declared "relative" to gain control of stacking order (z-index). */
    width:auto;
    min-width:120px;
    margin:0px 210px 20px 170px; /* top 0,right 210 ,bottom 20 ,left 170*/
    border:1px solid black;
    background-color:white;
    padding:10px;
    z-index:3; /* This allows the content to overlap the right menu in narrow windows in good browsers. */
    }

#navAlpha {
    position:absolute;
    width:150px;
    top:20px; /* was 20 */
    left:20px;
    border:1px dashed black;
    background-color:#eee;
    padding:10px;
    z-index:2;

/* Here is the ugly brilliant hack that protects IE5/Win from its own stupidity. 
Thanks to Tantek Celik for the hack and to Eric Costello for publicizing it. 
IE5/Win incorrectly parses the "\"}"" value, prematurely closing the style 
declaration. The incorrect IE5/Win value is above, while the correct value is 
below. See http://glish.com/css/hacks.asp for details. */
    voice-family: "\"}\"";
    voice-family:inherit;
    width:128px;
    }
/* I've heard this called the "be nice to Opera 5" rule. Basically, it feeds correct 
length values to user agents that exhibit the parsing error exploited above yet get 
the CSS box model right and understand the CSS2 parent-child selector. ALWAYS include
a "be nice to Opera 5" rule every time you use the Tantek Celik hack (above). */
body>#navAlpha {width:128px;}
        
#navBeta {
    position:absolute;
    width:190px;
    top:20px; /* was 20 */
    right:20px;
    border:1px dashed black;
    background-color:#eee;
    padding:10px;
    z-index:1;
/* Again, the ugly brilliant hack. */
    voice-family: "\"}\"";
    voice-family:inherit;
    width:168px;
    }
/* Again, "be nice to Opera 5". */
body>#navBeta {width:168px;}


-Edit-

Zo ziet het er nu uit:

http://home.wanadoo.nl/r.rubingh/GOT/got.html

Random WTF


  • Crayne
  • Registratie: Januari 2002
  • Laatst online: 17-03 13:41

Crayne

Have face, will travel

Spasm schreef op donderdag 23 november 2006 @ 10:58:
Boven onderstaande code zou ik graag een banner maken, maar ik heb geen idee hoe dit werkt.
Ik heb geprobeerd er gewoon een div boven te zetten, met breedte 100%, maar deze wordt opgeslokt door de rest.
Omdat allebei je navigaties absoluut gepositioneerd zijn en de content divs met de rest gelijk lopen d.m.v. hun margins.
Verder snap ik niet helemaal waarom er in de html eerst begonnen moet worden de content, en niet met de links.
Onzin, dat hoeft helemaal niet.

Het onderstaande levert netjes op wat je wilt en het is echt niet moeilijk. Ik zeg niet dat het de enige weg naar Rome is, laat staan dat het perfect is, maar ik denk dat je eerst nog eens in de CSS documentatie moet duiken.

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
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
    <title>Three Columns - Flanking Menus</title>
    <style type="text/css">

body {
    color:#333;
    background-color:white;
    margin:20px;
    padding:0px;
    font:11px verdana, arial, helvetica, sans-serif;
    }
h1 {
    margin:0px 0px 15px 0px;
    padding:0px;
    font-size:28px;
    font-weight:900;
    color:#ccc;
    }
h2 {
    font:bold 12px/14px verdana, arial, helvetica, sans-serif;
    margin:0px 0px 5px 0px;
    padding:0px;
    }
p {
    font:11px/20px verdana, arial, helvetica, sans-serif;
    margin:0px 0px 16px 0px;
    padding:0px;
    }
.Content>p {margin:0px;}
.Content>p+p {text-indent:30px;}

a {
    color:#09c;
    font-size:11px;
    font-family:verdana, arial, helvetica, sans-serif;
    font-weight:600;
    text-decoration:none;
    }
a:link {color:#09c;}
a:visited {color:#07a;}
a:hover {background-color:#eee;}
  
/* All the content boxes belong to the content class. */
.content {
    position:relative; /* Position is declared "relative" to gain control of stacking order (z-index). */
    width:auto;
    min-width:120px;
    margin: 120px 210px 20px 170px; /* top 0,right 210 ,bottom 20 ,left 170*/
    border:1px solid black;
    background-color:white;
    padding:10px;
    z-index:3; /* This allows the content to overlap the right menu in narrow windows in good browsers. */
    }

#banner {
    width: 100%;
    height: 100px;
    border: 1px solid #000000;
    font-size: 80px;
    font-weight: bold;
    text-align: center;
    position: absolute;
    top: 0px;
    left: 0px;
    padding: 10px;
    z-index: 4;
    voice-family: "\"}\"";
    voice-family:inherit;
    width: 100%;
    }
body>#banner {width: 100%;}
    
}

#navAlpha {
    position:absolute;
    width:150px;
    top:140px; /* was 20 */
    left:20px;
    border:1px dashed black;
    background-color:#eee;
    padding:10px;
    z-index:2;

/* Here is the ugly brilliant hack that protects IE5/Win from its own stupidity. 
Thanks to Tantek Celik for the hack and to Eric Costello for publicizing it. 
IE5/Win incorrectly parses the "\"}"" value, prematurely closing the style 
declaration. The incorrect IE5/Win value is above, while the correct value is 
below. See http://glish.com/css/hacks.asp for details. */
    voice-family: "\"}\"";
    voice-family:inherit;
    width:128px;
    }
/* I've heard this called the "be nice to Opera 5" rule. Basically, it feeds correct 
length values to user agents that exhibit the parsing error exploited above yet get 
the CSS box model right and understand the CSS2 parent-child selector. ALWAYS include
a "be nice to Opera 5" rule every time you use the Tantek Celik hack (above). */
body>#navAlpha {width:128px;}
        
#navBeta {
    position:absolute;
    width:190px;
    top:140px; /* was 20 */
    right:20px;
    border:1px dashed black;
    background-color:#eee;
    padding:10px;
    z-index:1;
/* Again, the ugly brilliant hack. */
    voice-family: "\"}\"";
    voice-family:inherit;
    width:168px;
    }
/* Again, "be nice to Opera 5". */
body>#navBeta {width:168px;}
    
    </style>
    
</head>

<body>

<div id="banner">BANNER</div>
<div id="navAlpha">
    <h2>Links</h2>

    <p>
        
        <a href="" title="">Nep link O,5</a><br>
        <a href="" title="">Nep link 1</a><br>
        <a href="" title="">Nep link 2</a><br>
        <a href="" title="">Nep link 3</a><br>
        <a href="" title="">Nep link 4</a><br>
    </p>
</div>

<div class="content">
    <h1>Content</h1>
    <p>Blaat</p>

    
</div>

<div class="content">
    <h2>Nog meer blaat</h2>
    <p>Blaatblaterdeblaatblaat</p>

</div>

<div class="content">
    <p>Je raad het al !! Nog meer geblaat !</p>
</div>

<div id="navBeta">

    <h2>Rechts</h2>
    <p>Bladibladi bla nag nag nag.<br>
    Nog meer onzin.
    </p>
</div>

<!-- BlueRobot was here. -->

</body>
</html>

Mijn Library Thing catalogus


  • Spasm
  • Registratie: Juni 2001
  • Laatst online: 06:42
Bedankt, maar op deze manier ziet het er niet echt uit zoals ik bedoel.
Met jou code ziet het er zo uit:

http://home.wanadoo.nl/r.rubingh/GOT/got2.html

De bedoeling is dit, maar dan met banner:

http://home.wanadoo.nl/r.rubingh/GOT/got.html

Random WTF


  • Crayne
  • Registratie: Januari 2002
  • Laatst online: 17-03 13:41

Crayne

Have face, will travel

Spasm schreef op donderdag 23 november 2006 @ 12:08:
Bedankt, maar op deze manier ziet het er niet echt uit zoals ik bedoel.
Met jou code ziet het er zo uit:

http://home.wanadoo.nl/r.rubingh/GOT/got2.html

De bedoeling is dit, maar dan met banner:

http://home.wanadoo.nl/r.rubingh/GOT/got.html
Tja, dat komt omdat de content divs een top-margin van 120px meekrijgen in mijn code. Als je dat op wilt lossen kun je toch echt het best jezelf gaan verdiepen in de nodige CSS tutorials en guides. :)

Mijn Library Thing catalogus


  • Spasm
  • Registratie: Juni 2001
  • Laatst online: 06:42
Het is me nu gelukt, maar alleen in IE7 :( Als ik in firefox kijk, dan staan de kollommen met links en rechts te laag. Zie hier:

Afbeeldingslocatie: http://home.wanadoo.nl/r.rubingh/GOT/screen.jpg

Is dit nog op de één of andere manier op te lossen ?

html

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
53
54
55
56
57
58
59
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
    <title>Three Columns - Flanking Menus</title>
    <style type="text/css" media="screen">@import "got_layout3.css";</style>
    
</head>

<body>
<div class="header">
<h1>header</h4>
</div>


<div class="content_first">
    <h1>Content</h1>
    <p>Blaat</p>

    
</div>

<div class="content">
    <h2>Nog meer blaat</h2>
    <p>Blaatblaterdeblaatblaat</p>

</div>

<div class="content">
    <p>Je raad het al !! Nog meer geblaat !</p>
</div>

<div id="navAlpha">
    <h2>Links</h2>

    <p>
        
        <a href="" title="">Nep link O,5</a><br>
        <a href="" title="">Nep link 1</a><br>
        <a href="" title="">Nep link 2</a><br>
        <a href="" title="">Nep link 3</a><br>
        <a href="" title="">Nep link 4</a><br>
    </p>
</div>


<div id="navBeta">

    <h2>Rechts</h2>
    <p>Bladibladi bla nag nag nag.<br>
    Nog meer onzin.
    </p>
</div>

<!-- BlueRobot was here. -->

</body>
</html>


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
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
body {
    color:#333;
    background-color:white;
    margin:20px;
    padding:0px;
    font:11px verdana, arial, helvetica, sans-serif;
    }
h1 {
    margin:0px 0px 15px 0px;
    padding:0px;
    font-size:28px;
    font-weight:900;
    color:#ccc;
    }
h2 {
    font:bold 12px/14px verdana, arial, helvetica, sans-serif;
    margin:0px 0px 5px 0px;
    padding:0px;
    }
p {
    font:11px/20px verdana, arial, helvetica, sans-serif;
    margin:0px 0px 16px 0px;
    padding:0px;
    }
.Content>p {margin:0px;}
.Content>p+p {text-indent:30px;}

a {
    color:#09c;
    font-size:11px;
    font-family:verdana, arial, helvetica, sans-serif;
    font-weight:600;
    text-decoration:none;
    }
a:link {color:#09c;}
a:visited {color:#07a;}
a:hover {background-color:#eee;}

.header {
    position: static;
    margin-top: 50px;
    margin-left: 0px;
    height: 44px;
    border:1px solid black;
    background-color:#eee;
   
}
    
  
/* All the content boxes belong to the content class. */
.content {
    position:relative; /* Position is declared "relative" to gain control of stacking order (z-index). */
    width:auto;
    min-width:120px;
    margin:20px 210px 20px 170px; /* top 0,right 210 ,bottom 20 ,left 170*/
    border:1px solid black;
    background-color:white;
    padding:10px;
    z-index:3; /* This allows the content to overlap the right menu in narrow windows in good browsers. */
    }


.content_first {
    position:relative; /* Position is declared "relative" to gain control of stacking order (z-index). */
    width:auto;
    min-width:120px;
    margin:34px 210px 20px 170px; /* top 0,right 210 ,bottom 20 ,left 170*/
    border:1px solid black;
    background-color:white;
    padding:10px;
    z-index:3; /* This allows the content to overlap the right menu in narrow windows in good browsers. */
    }


#navAlpha {
    position:absolute;
    width:150px;
    top:150px; /* was 20 */
    left:20px;
    border:1px dashed black;
    background-color:#eee;
    padding:10px;
    z-index:2;

/* Here is the ugly brilliant hack that protects IE5/Win from its own stupidity. 
Thanks to Tantek Celik for the hack and to Eric Costello for publicizing it. 
IE5/Win incorrectly parses the "\"}"" value, prematurely closing the style 
declaration. The incorrect IE5/Win value is above, while the correct value is 
below. See http://glish.com/css/hacks.asp for details. */
    voice-family: "\"}\"";
    voice-family:inherit;
    width:128px;
    }
/* I've heard this called the "be nice to Opera 5" rule. Basically, it feeds correct 
length values to user agents that exhibit the parsing error exploited above yet get 
the CSS box model right and understand the CSS2 parent-child selector. ALWAYS include
a "be nice to Opera 5" rule every time you use the Tantek Celik hack (above). */
body>#navAlpha {width:128px;}
        
#navBeta {
    position:absolute;
    width:190px;
    top:150px; /* was 20 */
    right:20px;
    border:1px dashed black;
    background-color:#eee;
    padding:10px;
    z-index:1;
/* Again, the ugly brilliant hack. */
    voice-family: "\"}\"";
    voice-family:inherit;
    width:168px;
    }
/* Again, "be nice to Opera 5". */
body>#navBeta {width:168px;}

Random WTF


  • titan_pi8
  • Registratie: Januari 2004
  • Laatst online: 11-11 23:10
Ik ben zeker geen CSS specialist, maar ik dacht mij te herinneren dat FireFox en IE andere standaardwaarden voor de margins gebruiken.

Ik zou eens proberen om wat te spelen met de margin-height of margin-top eigenschappen in uw navAlpha en navBeta stukken.

  • Spasm
  • Registratie: Juni 2001
  • Laatst online: 06:42
titan_pi8 schreef op vrijdag 24 november 2006 @ 08:30:
Ik ben zeker geen CSS specialist, maar ik dacht mij te herinneren dat FireFox en IE andere standaardwaarden voor de margins gebruiken.

Ik zou eens proberen om wat te spelen met de margin-height of margin-top eigenschappen in uw navAlpha en navBeta stukken.
Het komt om de 1 of andere reden van de header, want als ik het zo doe (zonder banner).
Gaat het in beide browsers goed.

http://home.wanadoo.nl/r.rubingh/GOT/got.html

Random WTF


Verwijderd

Niet een direct antwoord op je vraag, maar wel iets waar je aan hebt voor de toekomst: gebruik geen hacks als het niet hoeft. Het is namelijk afwachten hoe toekomstige browsers (en nieuwe zoals IE7) hier mee omgaan en mogelijk je layout verprutsen. Je design kan prima gebouwd worden zonder hacks.

Verwijderd

Het was een bekend probleem in Iexplore6, maar in firefox zou het gewoon goed moeten gaan.

Je kan je site helemaal correct maken voor firefox en dan met behulp van conditional comments wat bugfixes maken voor Iexplore. Conditional comments worden hier uitgelegd: http://www.quirksmode.org/css/condcom.html

  • Spasm
  • Registratie: Juni 2001
  • Laatst online: 06:42
Verwijderd schreef op vrijdag 24 november 2006 @ 10:57:
Het was een bekend probleem in Iexplore6, maar in firefox zou het gewoon goed moeten gaan.

Je kan je site helemaal correct maken voor firefox en dan met behulp van conditional comments wat bugfixes maken voor Iexplore. Conditional comments worden hier uitgelegd: http://www.quirksmode.org/css/condcom.html
Thanx, leuke functie opzich, maar hoe kan ik dan bijvoorbeeld voor IE7 stylesheet A, oproepen bijvoorbeeld, en alle andere browsers stylesheet B ? Ik snap dat ik voor IE7 dit zou kunnen doen:

code:
1
2
3
<!--[if IE 7]>
<style type="text/css" media="screen">@import "IE.css";</style>
<![endif]-->


Maar hoe regel ik dan dat er in elk ander geval stylesheet style.css gekozen word ?

Random WTF


Verwijderd

Spasm schreef op vrijdag 24 november 2006 @ 14:28:
Maar hoe regel ik dan dat er in elk ander geval stylesheet style.css gekozen word ?
Zelf maak ik altijd een algemene stylesheet. Alleen de afwijkingen (lees: IE-bugs) hierop verwerk ik in het extra stijlblad voor Internet Explorer. Alle browsers krijgen dus de algemene stylesheet gevoerd, alleen IE krijgt er een corrigerende stylesheet bij. Doordat mijn layouts niet zo ingewikkeld zijn blijft mijn IEFix.css meestal beperkt tot een regel of twintig :).

  • Boelie-Boelie
  • Registratie: November 2004
  • Laatst online: 26-09-2020
Ik vind die manier van Blue Robot sowieso niet meer aan te raden. Sinds 2003 zijn er inmiddels wel betere oplossingen voor een driekolomslayout bedacht, zoals op Joshuaink of TJKdesign. Of zoek op GoT/rest van internet ff naar 'one true layout' of 'holy grail' (die van ALA werkt overigens niet zondermeer in IE5).

In IE7 zijn als het goed is de meeste CSS-bugs opgelost waardoor verschillen tussen FF en IE7 veel zeldzamer zijn; het zou me nix verbazen als het verschil in deze case te wijten valt aan het gebruik van hacks (zoals hierboven en ook op het IE-blog al wordt afgeraden).

Cogito ergo dubito


  • Mei
  • Registratie: Juni 2005
  • Laatst online: 17-10-2024

Mei

Crayne schreef op donderdag 23 november 2006 @ 11:43:
[...]


Onzin, dat hoeft helemaal niet.
Vanuit het oogpunt van toegankelijkheid wel ;) Het belangrijkste komt eerst en dat is toch meestal de content.

  • Crayne
  • Registratie: Januari 2002
  • Laatst online: 17-03 13:41

Crayne

Have face, will travel

Mei schreef op zondag 26 november 2006 @ 14:33:
Vanuit het oogpunt van toegankelijkheid wel ;) Het belangrijkste komt eerst en dat is toch meestal de content.
Ik interpreteerde de vraag ook als: "Waarom moet content eerst komen om het juist op de pagina te tonen?", gezien de rest van de post ook over positionering ging. ;)

Mijn Library Thing catalogus


  • Spasm
  • Registratie: Juni 2001
  • Laatst online: 06:42
Nou, het is me min of meer gelukt. Op een 'kleinigheidje' in Mozilla na dan. Bij IE lopen alle div's tot beneden door, maar bij FF laat hij een aantal pixels witruimte aan de onderkant over.

Zie:

http://home.wanadoo.nl/r.rubingh/GOT/grail_probeersel.html

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
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>The Holy Grail of Layouts: Example #3: A List Apart</title>
    <style type="text/css">

        /*** The Essential Code ***/
    /*  html {
            overflow: auto;
        }
    */  

        body {
            min-width: 630px;         /* 2 x (LC fullwidth + CC padding) + RC fullwidth 630*/
        }

        #container {
            padding-left: 120px;      /* LC fullwidth 200 */
            padding-right:190px;     /* RC fullwidth + CC padding 190 */
        }
        
        #container .column {
            position: relative;
            float: left;
            }
        
        #center {
            padding: 10px 20px;       /* CC padding */
            width: 100%;
            

        }
        
        #left {
            width: 100px;             /* LC width 180*/
            padding: 0 10px;          /* LC padding */
            right: 160px;             /* LC fullwidth + CC padding 240 */
            margin-left: -100%;

        }
        
        #right {
            width: 130px;             /* RC width 130 */ 
            padding: 0 10px;          /* RC padding */
            margin-right: -100%;
        }
        


        /*** Equal-height Columns ***/

        #container {
        
            overflow: hidden;
        }




        
        /*** Just for Looks ***/
    

        body {
            margin: 0;
            padding: 0;
            background: Black;
            background: url(bg.jpg);
            background-position: top;
            background-repeat: no-repeat;

        }

        #header {
            font-size: large;
            color: #FFCCCC;
            text-align: center;
            padding: 3.2em 0;
            border-bottom: 0px solid black;


        }

        #left {
            font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
            font-size: 11px;
            background: #4F4F4F;
            height: 470px;


        }

        #center {
            font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
            font-size: 11px;
            background: White;
            height: 460px;
            background-attachment: fixed;
            overflow: auto;
            overflow-x:auto; 
            /*overflow: -moz-scrollbars-vertical;*/


        }

        #right {

            font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
            font-size: 11px;
            background: #FFEAFF;
            height: 470px;



            
        }

        #container .column {
            padding-top: 1em;
            text-align: justify;
        
        
        
        }

    </style>
</head>

<body>

    <div id="header"></div>

    <div id="container">

        <div id="center" class="column">
            This is the main content.
            <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla.</p>
            <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla.</p>
            <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla.</p>
            <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla.</p>
            <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla.</p>
            <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla.</p>
            <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla.</p>
            <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla.</p>
            <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla.</p>
            
            
            
        </div>

        <div id="left" class="column">
            This is the left sidebar.

        </div>

        <div id="right" class="column">
            This is the right sidebar.


        </div>

    </div>

    

</body>

</html>

Random WTF


  • Spasm
  • Registratie: Juni 2001
  • Laatst online: 06:42
Nee !! Kom er net achter dat het er in IE6 en IE5.5 helemaal bagger uitziet !

Hoe kan dat toch ?

Random WTF

Pagina: 1