Ik heb een pagina gemaakt met de volgende code:
Nu wil ik de pagina graag centreren in de browser zoals hier bijvoorbeeld:
Is er een mogelijkheid om de eerste pagina in de tweede te plaatsen? Ik heb al aardig wat zitten google-en maar zie door de bomen het bos niet meer. Hoop dat iemand dit uit kan leggen zodat ik eindelijk eens echt (goed) met CSS aan de slag kan. Ben een beginner m.b.t. CSS en het kwartje wil maar niet vallen.
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
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>CSS test</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"><!-- body { background-image: url(images/backscheef.gif); background-repeat: no-repeat; background-attachment: fixed; background-position: 5px -100px; } body, td, th { font-family: "Times New Roman", Times, serif; font-size: 10px; color: #000000; } a:link { color: #666666; text-decoration: none; } a:visited { text-decoration: none; color: #666666; } a:hover { text-decoration: none; color: #ff0000; } a:active { text-decoration: none; color: #0000ff; } .style1 { font-size: 14px } --></style> <script type="text/JavaScript" language="JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); //--> </script> </head> <body> <div id="UNDER_CONSTRUCTION" style="position:absolute; left: 10px; top: 10px; width:1000; height:55px; z-index:3; font-size: 36px; color: #FF0000;">THIS SITE IS UNDER CONSTRUCTION!</div> <div id="Logo" style="position:absolute; left: 215px; top: 60px; width:244px; height:55px; z-index:3; background-color: #FFFF66;"><div align="center"><a href="index.htm" target="_parent">LOGO</a></div></div> <div id="Links" style="position:absolute; left: 50px; top: 115px; width:270px; height:375px; z-index:2; background-color: #CCCCCC; border: 3px solid yellow;">Foto Links</div> <div id="Rechts" style="position:absolute; left: 360px; top: 60px; width:400px; height:380px; z-index:1; background-color: #CCCCCC; border: 3px solid yellow;"><div align="right">Foto Rechts</div></div> <div id="Link 1" style="position:absolute; left: 286px; top: 183px; width:100px; height:18px; z-index:6; color: #FFFFFF; font-size: 18px; font-weight: bold;">Link 1</div> <div id="Link 1_Black" style="position:absolute; left: 288px; top: 185px; width:100px; height:18px; z-index:5; color: black; font-size: 18px; font-weight: bold;">Link 1</div> <div id="Link 2" style="position:absolute; left: 256px; top: 233px; width:200px; height:18px; z-index:6; color: #FFFFFF; font-size: 18px; font-weight: bold;">Link 2</div> <div id="Link 2_Black" style="position:absolute; left: 258px; top: 235px; width:200px; height:18px; z-index:5; color: black; font-size: 18px; font-weight: bold;">Link 2</div> <div id="Link 3" style="position:absolute; left: 236px; top: 283px; width:200px; height:18px; z-index:6; color: #FFFFFF; font-size: 18px; font-weight: bold;">Link 3</div> <div id="Link 3_Black" style="position:absolute; left: 238px; top: 285px; width:200px; height:18px; z-index:5; color: black; font-size: 18px; font-weight: bold;">Link 3</div> <div id="Link 4" style="position:absolute; left: 226px; top: 333px; width:200px; height:18px; z-index:6; color: #FFFFFF; font-size: 18px; font-weight: bold;">Link 4</div> <div id="Link 4_Black" style="position:absolute; left: 228px; top: 335px; width:200px; height:18px; z-index:5; color: black; font-size: 18px; font-weight: bold;">Link 4</div> <div id="Link 5" style="position:absolute; left: 246px; top: 383px; width:200px; height:18px; z-index:6; color: #FFFFFF; font-size: 18px; font-weight: bold;">Link 5</div> <div id="Link 5_Black" style="position:absolute; left: 248px; top: 385px; width:200px; height:18px; z-index:5; color: black; font-size: 18px; font-weight: bold;">Link 5</div> <div id="Button1" style="position:absolute; left: 360px; top: 456px; width:197px; height:18px; z-index:4; background-color: #A8C990; padding: 2px 0px 0px 0px"><div class="style1" align="center">Button 1</div></div> <div id="Button2" style="position:absolute; left: 569px; top: 456px; width:197px; height:18px; z-index:4; background-color: #80B461; padding: 2px 0px 0px 0px"><div class="style1" align="center">Button 2</div></div> <div id="Button3" style="position:absolute; left: 360px; top: 486px; width:197px; height:18px; z-index:4; background-color: #A8C990; padding: 2px 0px 0px 0px"><div class="style1" align="center">Button 3</div></div> <div id="Button4" style="position:absolute; left: 569px; top: 486px; width:197px; height:18px; z-index:4; background-color: #80B461; padding: 2px 0px 0px 0px"><div class="style1" align="center">Button 4</div></div> <div id="Button3" style="position:absolute; left: 360px; top: 516px; width:197px; height:18px; z-index:4; background-color: #A8C990; padding: 2px 0px 0px 0px"><div class="style1" align="center">Button 5</div></div> <div id="Button4" style="position:absolute; left: 569px; top: 516px; width:197px; height:18px; z-index:4; background-color: #80B461; padding: 2px 0px 0px 0px"><div class="style1" align="center">Button 6</div></div> </body> </html> |
Nu wil ik de pagina graag centreren in de browser zoals hier bijvoorbeeld:
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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta name="generator" content="Adobe GoLive" /> <title>TEST</title> <style type="text/css" media="screen"><!-- html, body, ul, ol, li, p, h1, h2, h3, h4, h5, h6, form, fieldset { margin: 0; padding: 0; border: 0; } body{ background-color:#666666; color:#666666; font-family:Verdana, Arial, Helvetica, sans-serif; margin: 0; padding: 0; text-align: left; } #wrapper { height: 480px; width: 770px; background-color:#ffffff; margin:auto; border: solid 1px #000000; } #laag1 { height: 100px; width: 100px; left: 10px; top: 20px; position: relative; visibility: visible; border: solid 1px #000000;} --></style> </head> <body> <div id="wrapper">WRAPPER <div align="left"><div id="laag1">CONTENT</div> </div> </body> </html> |
Is er een mogelijkheid om de eerste pagina in de tweede te plaatsen? Ik heb al aardig wat zitten google-en maar zie door de bomen het bos niet meer. Hoop dat iemand dit uit kan leggen zodat ik eindelijk eens echt (goed) met CSS aan de slag kan. Ben een beginner m.b.t. CSS en het kwartje wil maar niet vallen.