Problem z menu
Posty: 2 Strona 1 z 1
Problem z menu
Mam problem z moją stroną, chcę zrobić górne menu, które będzie zajmowało całą szerokość strony i jednocześnie przylegało do reszty strony. Teraz mam jakieś dziwne marginesy po bokach i między menu i główną częścią strony znajduję się przerwa, nie mam pojęcia czemu ; s. Pomoże ktoś?Stronka:
- Kod: Zaznacz cały
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Szablon Strony</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
</head>
<body>
<div id="menu3">
</div>
<div id="pojemnik">
<div id="naglowek">
</div>
<div id="menu">
</div>
<div id="tresc">
</div>
<div id="stopka">
</div>
</div>
</body>
</html>
Css:
- Kod: Zaznacz cały
/*Znaczniki tekstu*/
h2 {
font-size:50px;
color:blue;
text-align:center;
}
h1 {
font-size:35px;
text-align:center;
}
/*Strona*/
html, body {
background-color: #000000;
background-image: url(obrazek2.jpg);
background-position: center;
background-attachment: fixed;
background-repeat: no-repeat;
}
#pojemnik {
height:1050px;
width:1440px;
margin-left: auto;
margin-right: auto;
}
#naglowek {
height:300px;
width:1440px;
background-color:red;
}
#menu {
width: 440px;
background-color:green;
float:left;
height: 600px;
text-align:center;
}
#tresc {
width: 1000px;
background-color:blue;
float:left;
height: 600px;
}
#stopka {
width:1440px;
height:150px;
background-color:red;
clear:both;
}
#menu2 {
width: 1440px;
height: 50px;
background-color: pink;
}
#menu3 {
height:100px;
width: 100%;
background-color: pink;
}
Re: Problem z menu
nie używasz resetu css?ok wklej ten kod na górze css
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
Strona 1 z 1