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
css
-Edit-
Zo ziet het er nu uit:
http://home.wanadoo.nl/r.rubingh/GOT/got.html
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
