Центриране на сайт

as0s

Registered
Здравейте дадоха ми 1 сайт самоче е на дясно много искам да го центрирате :) Вижте как изглежда

a3e9742cfbdd0ef4.jpg


index.html

Код:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Dolce Radio: Начало</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<script language=JavaScript>
var message="Не копирай сайта а слушай музиката! Поздрави DJ BuTaMuH-C";
function clickIE4()
{
if (event.button==2)
{
alert(message);
return false;
}}
function clickNS4(e)
{
if (document.layers||document.getElementById&&!document.all)
{
if (e.which==2||e.which==3)
{
alert(message);
return false;
}}}
if (document.layers)
{
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById)
{
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false")
</script>

</head>


<body>

<div id="image1" style="position:absolute; overflow:hidden; left:0px; top:0px; width:1239px; height:1000px; z-index:0"><img src="images/img1635703.png" alt="" border=0 width=1239 height=1000></div>

<div id="image2" style="position:absolute; overflow:hidden; left:141px; top:0px; width:976px; height:202px; z-index:1"><img src="images/a_03.png" alt="" border=0 width=976 height=202></div>

<div id="image3" style="position:absolute; overflow:hidden; left:206px; top:202px; width:161px; height:56px; z-index:2"><a href="index.html"><img src="images/a_06.png" alt="" border=0 width=161 height=56></a></div>

<div id="image4" style="position:absolute; overflow:hidden; left:367px; top:202px; width:135px; height:56px; z-index:3"><a href="programa.html"><img src="images/a_07.png" alt="" border=0 width=135 height=56></a></div>

<div id="image5" style="position:absolute; overflow:hidden; left:502px; top:202px; width:112px; height:56px; z-index:4"><a href="slushai.html"><img src="images/a_08.png" alt="" border=0 width=112 height=56></a></div>

<div id="image6" style="position:absolute; overflow:hidden; left:614px; top:202px; width:130px; height:56px; z-index:5"><a href="kontakti.html"><img src="images/a_09.png" alt="" border=0 width=130 height=56></a></div>

<div id="image7" style="position:absolute; overflow:hidden; left:744px; top:202px; width:138px; height:56px; z-index:6"><a href="reklama.html"><img src="images/a_10.png" alt="" border=0 width=138 height=56></a></div>

<div id="image8" style="position:absolute; overflow:hidden; left:882px; top:202px; width:235px; height:56px; z-index:7"><a href="za.nas.html"><img src="images/a_11.png" alt="" border=0 width=235 height=56></a></div>

<div id="image9" style="position:absolute; overflow:hidden; left:140px; top:259px; width:976px; height:722px; z-index:8"><img src="images/a_12.png" alt="" border=0 width=976 height=722></div>

<div id="image10" style="position:absolute; overflow:hidden; left:712px; top:284px; width:200px; height:50px; z-index:9"><img src="images/Novini.png" alt="" border=0 width=200 height=50></div>


<div id="html1" style="position:absolute; overflow:hidden; left:169px; top:286px; width:508px; height:453px; z-index:10">
<SCRIPT type="text/javascript">



var img_width = "340";
var img_height = "304";
var img_title = "Dolce Radio";


var ad=new Array()
//insert here your images src
ad[0]='http://store.picbg.net/pubpic/8F/4F/1b6c8ca19cad8f4f.png';
ad[1]='http://store.picbg.net/pubpic/38/8B/e81157fee67a388b.png';
ad[2]='http://store.picbg.net/pubpic/4A/37/fe94b53f4af44a37.png';
ad[3]='http://store.picbg.net/pubpic/1E/C4/6a6b5ab99d331ec4.png';
ad[4]='http://store.picbg.net/pubpic/8F/4F/1b6c8ca19cad8f4f.png';

var links=new Array()
//insert here your links
links[0]='index.html';
links[1]='index.html';
links[2]='index.html';
links[3]='index.html';
links[4]='index.html';
var xy=Math.floor(Math.random()*ad.length);
document.write('<a href="'+links[xy]+'" target="_blank"><img src="'+ad[xy]+'" width="'+img_width+'" height="'+img_height+'" alt="'+img_title+'"></a>');
</SCRIPT></div>

<div id="text1" style="position:absolute; overflow:hidden; left:537px; top:352px; width:543px; height:471px; z-index:11"><div class="wpmd">
<div align=center><font class="ws16" color="#F0F000"><B>Добре дошли в сайта на Dolce Radio тук може да намерите всичко за радиото и екипът му.</B></font></div>


<div align="center"></div>
</div>
<div id="apDiv5">
  <object id="MediaPlayer1" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab# Version=5,1,52,701" standby="Loading Microsoft Windows® Media Player components..." type="application/x-oleobject" height="46" width="315">
    <param name="fileName" value="http://212.50.15.241:8016/listen.pls" />
    <param name="animationatStart" value="true" />
    <param name="transparentatStart" value="true" />
    <param name="autoStart" value="true" />
    <param name="showControls" value="true" />
    <param name="Volume" value="-300" />
    <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://212.50.15.241:8016" name="MediaPlayer1" autostart="1" showcontrols="1" volume="-300" height="46" width="315"> </embed>
  </object>
</div>



<div align=center><font color="#00CCFF"><B><BR></B></font></div>
<div align=center><font class="ws12" color="#FF0000"><B>Набираме сериозни DJ-и с опит и желание :)</B></font></div>
<div align=center><font class="ws12" color="#FFFFFF"><B><BR></B></font></div>
<div align=center><font class="ws12" color="#FFFFFF"><B>Изискванията са: </B></font></div>
<div align=center><font class="ws12" color="#FFFFFF"><B>1.Възраст над 12 години (препоръчително)</B></font></div>
<div align=center><font class="ws12" color="#FFFFFF"><B>2.Да води радиото поне 2 часа (задължително)</B></font></div>
<div align=center><font class="ws12" color="#FFFFFF"><B>3.Да си разбира от работата (ако не разбира ще го ориентирам)</B></font></div>
<div align=center><font class="ws12" color="#FFFFFF"><B>4.Да има микрофон!</B></font></div>
<div align=center><font class="ws12" color="#FFFFFF"><B><BR></B></font></div>
<div align=center><font class="ws12" color="#F2F200"><B>За връзка с нас на страница контакти.</B></font></div>





</div></div>
<div id="html2" style="position:absolute; overflow:hidden; left:637px; top:980px; width:200px; height:19px; z-index:12">

<script  type="text/javascript">

</script>
<noscript><a href="http://www.tyxo.bg/?87982" title="Tyxo.bg counter" target="_blank"><img src="http://cnt.tyxo.bg/87982" width="80" height="15" border="0" alt="Tyxo.bg counter" /></a></noscript>

</div>
<div id="html3" style="position:absolute; overflow:hidden; left:571px; top:846px; width:489px; height:65px; z-index:13">
<SCRIPT type="text/javascript">

var img_width = "468";
var img_height = "60";
var img_title = "Dolce Radio";


var ad=new Array()
//insert here your images src
ad[0]='http://redy-zone.info/banners/2.png';


var links=new Array()
//insert here your links
links[0]='redy-zone.info';

var xy=Math.floor(Math.random()*ad.length);
document.write('<a href="'+links[xy]+'" target="_blank"><img src="'+ad[xy]+'" width="'+img_width+'" height="'+img_height+'" alt="'+img_title+'"></a>');
</SCRIPT></div>
</body>
</html>
<a href="http://angelsmu.net/"><img src="http://store.picbg.net/pubpic/F3/AD/0c08dd5b9e6bf3ad.jpg" width="468" height="60" alt="DarksTeam Forums"></a>
[/url]
 
Код:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Dolce Radio: Начало</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<script language=JavaScript>
var message="Не копирай сайта а слушай музиката! Поздрави DJ BuTaMuH-C";
function clickIE4()
{
if (event.button==2)
{
alert(message);
return false;
}}
function clickNS4(e)
{
if (document.layers||document.getElementById&&!document.all)
{
if (e.which==2||e.which==3)
{
alert(message);
return false;
}}}
if (document.layers)
{
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById)
{
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false")
</script>

</head>


<body>

<div id="all" align="center">

<div id="image1" style="position:absolute; overflow:hidden; left:0px; top:0px; width:1239px; height:1000px; z-index:0"><img src="images/img1635703.png" alt="" border=0 width=1239 height=1000></div>

<div id="image2" style="position:absolute; overflow:hidden; left:141px; top:0px; width:976px; height:202px; z-index:1"><img src="images/a_03.png" alt="" border=0 width=976 height=202></div>

<div id="image3" style="position:absolute; overflow:hidden; left:206px; top:202px; width:161px; height:56px; z-index:2"><a href="index.html"><img src="images/a_06.png" alt="" border=0 width=161 height=56></a></div>

<div id="image4" style="position:absolute; overflow:hidden; left:367px; top:202px; width:135px; height:56px; z-index:3"><a href="programa.html"><img src="images/a_07.png" alt="" border=0 width=135 height=56></a></div>

<div id="image5" style="position:absolute; overflow:hidden; left:502px; top:202px; width:112px; height:56px; z-index:4"><a href="slushai.html"><img src="images/a_08.png" alt="" border=0 width=112 height=56></a></div>

<div id="image6" style="position:absolute; overflow:hidden; left:614px; top:202px; width:130px; height:56px; z-index:5"><a href="kontakti.html"><img src="images/a_09.png" alt="" border=0 width=130 height=56></a></div>

<div id="image7" style="position:absolute; overflow:hidden; left:744px; top:202px; width:138px; height:56px; z-index:6"><a href="reklama.html"><img src="images/a_10.png" alt="" border=0 width=138 height=56></a></div>

<div id="image8" style="position:absolute; overflow:hidden; left:882px; top:202px; width:235px; height:56px; z-index:7"><a href="za.nas.html"><img src="images/a_11.png" alt="" border=0 width=235 height=56></a></div>

<div id="image9" style="position:absolute; overflow:hidden; left:140px; top:259px; width:976px; height:722px; z-index:8"><img src="images/a_12.png" alt="" border=0 width=976 height=722></div>

<div id="image10" style="position:absolute; overflow:hidden; left:712px; top:284px; width:200px; height:50px; z-index:9"><img src="images/Novini.png" alt="" border=0 width=200 height=50></div>


<div id="html1" style="position:absolute; overflow:hidden; left:169px; top:286px; width:508px; height:453px; z-index:10">
<SCRIPT type="text/javascript">



var img_width = "340";
var img_height = "304";
var img_title = "Dolce Radio";


var ad=new Array()
//insert here your images src
ad[0]='http://store.picbg.net/pubpic/8F/4F/1b6c8ca19cad8f4f.png';
ad[1]='http://store.picbg.net/pubpic/38/8B/e81157fee67a388b.png';
ad[2]='http://store.picbg.net/pubpic/4A/37/fe94b53f4af44a37.png';
ad[3]='http://store.picbg.net/pubpic/1E/C4/6a6b5ab99d331ec4.png';
ad[4]='http://store.picbg.net/pubpic/8F/4F/1b6c8ca19cad8f4f.png';

var links=new Array()
//insert here your links
links[0]='index.html';
links[1]='index.html';
links[2]='index.html';
links[3]='index.html';
links[4]='index.html';
var xy=Math.floor(Math.random()*ad.length);
document.write('<a href="'+links[xy]+'" target="_blank"><img src="'+ad[xy]+'" width="'+img_width+'" height="'+img_height+'" alt="'+img_title+'"></a>');
</SCRIPT></div>

<div id="text1" style="position:absolute; overflow:hidden; left:537px; top:352px; width:543px; height:471px; z-index:11"><div class="wpmd">
<div align=center><font class="ws16" color="#F0F000"><B>Добре дошли в сайта на Dolce Radio тук може да намерите всичко за радиото и екипът му.</B></font></div>


<div align="center"></div>
</div>
<div id="apDiv5">
  <object id="MediaPlayer1" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab# Version=5,1,52,701" standby="Loading Microsoft Windows® Media Player components..." type="application/x-oleobject" height="46" width="315">
    <param name="fileName" value="http://212.50.15.241:8016/listen.pls" />
    <param name="animationatStart" value="true" />
    <param name="transparentatStart" value="true" />
    <param name="autoStart" value="true" />
    <param name="showControls" value="true" />
    <param name="Volume" value="-300" />
    <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://212.50.15.241:8016" name="MediaPlayer1" autostart="1" showcontrols="1" volume="-300" height="46" width="315"> </embed>
  </object>
</div>



<div align=center><font color="#00CCFF"><B><BR></B></font></div>
<div align=center><font class="ws12" color="#FF0000"><B>Набираме сериозни DJ-и с опит и желание :)</B></font></div>
<div align=center><font class="ws12" color="#FFFFFF"><B><BR></B></font></div>
<div align=center><font class="ws12" color="#FFFFFF"><B>Изискванията са: </B></font></div>
<div align=center><font class="ws12" color="#FFFFFF"><B>1.Възраст над 12 години (препоръчително)</B></font></div>
<div align=center><font class="ws12" color="#FFFFFF"><B>2.Да води радиото поне 2 часа (задължително)</B></font></div>
<div align=center><font class="ws12" color="#FFFFFF"><B>3.Да си разбира от работата (ако не разбира ще го ориентирам)</B></font></div>
<div align=center><font class="ws12" color="#FFFFFF"><B>4.Да има микрофон!</B></font></div>
<div align=center><font class="ws12" color="#FFFFFF"><B><BR></B></font></div>
<div align=center><font class="ws12" color="#F2F200"><B>За връзка с нас на страница контакти.</B></font></div>





</div></div>
<div id="html2" style="position:absolute; overflow:hidden; left:637px; top:980px; width:200px; height:19px; z-index:12">

<script  type="text/javascript">

</script>
<noscript><a href="http://www.tyxo.bg/?87982" title="Tyxo.bg counter" target="_blank"><img src="http://cnt.tyxo.bg/87982" width="80" height="15" border="0" alt="Tyxo.bg counter" /></a></noscript>

</div>
<div id="html3" style="position:absolute; overflow:hidden; left:571px; top:846px; width:489px; height:65px; z-index:13">
<SCRIPT type="text/javascript">

var img_width = "468";
var img_height = "60";
var img_title = "Dolce Radio";


var ad=new Array()
//insert here your images src
ad[0]='http://redy-zone.info/banners/2.png';


var links=new Array()
//insert here your links
links[0]='redy-zone.info';

var xy=Math.floor(Math.random()*ad.length);
document.write('<a href="'+links[xy]+'" target="_blank"><img src="'+ad[xy]+'" width="'+img_width+'" height="'+img_height+'" alt="'+img_title+'"></a>');
</SCRIPT></div>
</div>
</body>
</html>
<a href="http://angelsmu.net/"><img src="http://store.picbg.net/pubpic/F3/AD/0c08dd5b9e6bf3ad.jpg" width="468" height="60" alt="DarksTeam Forums"></a>
 
Подкрепям идеята, че сайтът е прекалено голям, за да го виждаш (специално ти) в центъра. Той си Е в центъра! В противен случай, щеше да видиш веднага ефекта от идеята на колегата justspy.
Прави си CSS-а отделно, много по-удобно е.

Мога да те посъветвам единствено да започнеш да нагласяш left на избрани от тебе стойности до постигане на желания резултат, но да не започваш да го пишеш наново не виждам как. :)
 

Back
Горе