Forum Webmastera, HTML, CSS, PHP, MySQL, Hosting, Domeny - Forum dla Webmasterów
[CSS] wysrodkowanie diva - Wersja do druku

+- Forum Webmastera, HTML, CSS, PHP, MySQL, Hosting, Domeny - Forum dla Webmasterów (https://www.webmastertalk.pl)
+-- Dział: Technologie internetowe - tworzenie stron WWW (https://www.webmastertalk.pl/forum-technologie-internetowe-tworzenie-stron-www)
+--- Dział: Początkujący webmaster (https://www.webmastertalk.pl/forum-poczatkujacy-webmaster)
+--- Wątek: [CSS] wysrodkowanie diva (/thread-css-wysrodkowanie-diva--9732)



[CSS] wysrodkowanie diva - taaniel - 01-08-2012

Witam chciałbym w tym kodzie wyśrodkować diva całość tak żeby czerwone tlo bylo prostokątem o wymiarach 760px na 960 px
Kod:
<!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" xml:lang="pl" lang="pl">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
    <meta name="Description" content="schemat" />
    <meta name="Keywords" content="schemat" />
    <title>schemat1</title>
    <link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>

<div id="calosc">
  <div id="baner"> <p>oqwehfhf[hqw[fhq[w]</p>
    <div id="zdjecie" <p>pweufhqwehfpqahgf[pqhw]</p></div>
         </div>
</div>

</body>
</html>

Kod:
body {
    background-attachment: scroll;
    background-color: #7A2122;
    background-position: center top;
    background-repeat: repeat-x;
    background-size: auto auto;
    color: #333333;
    font-size: 62.5%;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
}

#calosc{
background-color: red;
background-position: center top;
margin-bottom: 110;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;

}
#baner{

}
#zdjecie{

}


co tam potrzeba dodać??


RE: [CSS] wysrodkowanie diva - Ar2r - 01-08-2012

O coś takiego chodzi??
Kod:
body {
    background-attachment: scroll;
    background-color: #7A2122;
    background-position: center top;
    background-repeat: repeat-x;
    background-size: auto auto;
    color: #333333;
    font-size: 62.5%;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
}

#calosc{
background-color: red;
background-position: center top;
margin-bottom: 110;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    width: 760px;
    height: 960px;
   }

#baner{

}
#zdjecie{

}



RE: [CSS] wysrodkowanie diva - taaniel - 01-08-2012

tak dziekiSmile