[div] 100% ??

Pagina: 1
Acties:

  • Muppet
  • Registratie: Maart 2001
  • Laatst online: 10-09-2024

Muppet

GT: Beestig

Topicstarter
Ik wil dus een balk in een pagina maken met een [div] om daar een aantal items op te zetten als een menu.
dit is de code die ik gebruik
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
</head>
<title>test</title>
<style type="text/css">

#banner {
    color: white;
    position: absolute;
    top: 150px;
    left: 0px;
    background:#9999cc;
    border-bottom: 1px solid Black;
    border-top: 1px solid #D3D3D3;
    height : 30px;
    padding-left: 20px;
    width : 100%;
}
</style>
</head>

<body>
<div id="banner">
Menu
</div>
</body>
</html>

Alleen als ik dit doe en "width: 100%;" dan blijft er links ruimte over van pak hem beet 20px.

Zie hier voor voorbeeld.

Doe ik iets fout ?? Zie ik iets over het hoofd ?? Loop al een tijdje te zoeken maar kan niks vinden. Misschien dat dit wel anders moet.

There is no art to find the minds construction in the face


Verwijderd

code:
1
2
3
body {
  margin: 0px;
}

Dan kun je ook meteen left: 0px; en width: 100%; weglaten.
[edit: typo]

  • Muppet
  • Registratie: Maart 2001
  • Laatst online: 10-09-2024

Muppet

GT: Beestig

Topicstarter
haha wat stom zeg niet eens aan gedacht :) thnx

There is no art to find the minds construction in the face