14-11-2010, 21:23
Witam,
Mam problem z szerokością strony www. Strona napisana jest w html, i ma szerokość na cały ekran, czyli dopasowywuje się do całego ekranu, lecz tak nie ma być i chcę zrobić żeby na stronie były odstępy, tzn. Po prawej i lewej by był odstęp ok. 2cm, czyli jak zmienić szerokość strony?
Podam Wam mój kod strony, może nie cały ale początek od head.
Dałem przykład z szablonu, bez danych. Proszę o pomoc 
*** Podam wam cały style.css:
Mam problem z szerokością strony www. Strona napisana jest w html, i ma szerokość na cały ekran, czyli dopasowywuje się do całego ekranu, lecz tak nie ma być i chcę zrobić żeby na stronie były odstępy, tzn. Po prawej i lewej by był odstęp ok. 2cm, czyli jak zmienić szerokość strony?
Podam Wam mój kod strony, może nie cały ale początek od head.
Kod:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<meta name="Description" content="opis strony" />
<meta name="keywords" content="słowa kluczowe" />
<meta name="Author" content="Autor" />
<meta name="Robots" content="ALL" />
<meta name="revisit-after" content="14" />
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div class="pds">
<div><img src="images/top.jpg" alt="" border="0" usemap="#top" /></div>
<div class="m">

*** Podam wam cały style.css:
Kod:
@charset "utf-8";
/* CSS Document */
body {
background:#E7E7E7 url(images/bg.gif) repeat-x;
margin:0;
padding:0;
font-family:Arial, Helvetica, sans-serif;
}
.pds {
width:1000px;
margin:0 auto;
}
.m {
height:78px;
}
.m ul {
list-style:none;
margin:0;
padding:0;
}
.m li {
float:left;
}
.m a {
display:inline-block;
font-size:18px;
color:#fff;
padding:24px 30px;
background:url(images/m2.gif) no-repeat left center;
text-decoration:none;
font-weight:normal;
}
.m a:hover {
background:url(images/m1.gif) no-repeat left center;
color:#FF9;
}
.msub{ list-style:none;margin:5px; padding:0; }
.msub a{ display:block; padding:8px 20px; border-bottom: 1px dotted #A5A498; text-decoration:none; color:#000; }
.msub a:hover{ background:#000; color:#fff; }
.s {
background:url(images/stlo.jpg) no-repeat top center;
padding:10px 0px;
font-size:14px;
}
.left {
width:290px;
float:left;
}
.right {
width:670px;
float:right;
}
.mng {
background:url(images/mng.jpg) center no-repeat;
font-size:12px;
font-weight:bold;
color:#000;
padding:17px 20px;
margin:5px 0px;
}
.both {
clear:both;
}
.center {
text-align:center;
}
img {
border:0;
}
.stopka {
position:relative;
background:url(images/stopka.jpg) no-repeat;
height:80px;
}
.up {
position:absolute;
text-align:right;
top:30px;
right:70px;
font-size:11px;
}
.up a {
color:#fff;
text-decoration:none;
}
.up a:hover {
text-decoration:underline;
}
.ng {
font-size:18px;
font-weight:normal;
}
a{ color:#F60; }