елемент div

blackreplay

Registered
Някой може ли да ми обясни как да центрирам даден елемент или всички елементи с див.
 
аз ще съм най-кратък :)

<div style="margin:0px auto; width:1000px;">центрирано</div>


п.с. работи във всички браузери.
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
<meta http-equiv="Page-Enter" content="revealTrans(Duration=0,Transition=0)">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<meta name="generator" content="vip-music">
</head>

<style type="text/css">
.ws6 {font-size: 8px;}
.ws7 {font-size: 9.3px;}
.ws8 {font-size: 11px;}
.ws9 {font-size: 12px;}
.ws10 {font-size: 13px;}
.ws11 {font-size: 15px;}
.ws12 {font-size: 16px;}
.ws14 {font-size: 19px;}
.ws16 {font-size: 21px;}
.ws18 {font-size: 24px;}
.ws20 {font-size: 27px;}
.ws22 {font-size: 29px;}
.ws24 {font-size: 32px;}
.ws26 {font-size: 35px;}
.ws28 {font-size: 37px;}
.ws36 {font-size: 48px;}
.ws48 {font-size: 64px;}
.ws72 {font-size: 96px;}
.wpmd {font-size: 13px;font-family: 'Arial';font-style: normal;font-weight: normal;text-decoration: none;}
</style>


<body bgColor="#091114" Link="#FFFFFF" VLink="#FFFFFF" ALink="#FFFFFF">

<div id="image1" style="position:absolute; overflow:hidden; left:120px; top:0px; width:766px; height:730px; z-index:0"><img src="images/index1.jpg" border=0 width=766 height=730></div>

<div id="roundrect1" style="position:absolute; overflow:hidden; left:599px; top:533px; width:176px; height:90px; z-index:1"><img border=0 src="images/roundrect50078018.gif"></div>

<div id="html1" style="position:absolute; overflow:hidden; left:609px; top:543px; width:158px; height:69px; z-index:2">
<center><p style="visibility:visible;"><embed src="http://www.mp3asset.com/swf/mp3/minime.swf" quality="high" wmode="transparent" flashvars="myid=8932788&path=2008/04/01&mycolor=0x000000&mycolor2=0x000000&mycolor3=0xFFFFFF&autoplay=true&rand=0&f=3&vol=100&pat=0" width="160" height="68" name="myflashfetish" align="middle"type="application/x-shockwave-flash" /><br><a href="http://www.myflashfetish.com/music-player/" target="_blank"><img src="http://www.myflashfetish.com/images/mffico.gif" title="Make your own playlist!" style="border-style:none;" alt="music player"></a><br />I made this <a href="http://www.myflashfetish.com/playlist/8932788" target="_blank">music player</a> at <a href="http://www.myflashfetish.com" target="_blank">MyFlashFetish</a>.com.<br></p></center><embed height="0" width="0" src="http://counters.gigya.com/wildfire/CIMP/Jmx*PTEyMDcwODExNTAzNjkmcHQ9MTIwNzA4MTE1OTgzMyZwPTE4MDMxJmQ9Jm49.swf" flashvars="" type="application/x-shockwave-flash" /></div>

<div id="image2" style="position:absolute; overflow:hidden; left:231px; top:433px; width:175px; height:91px; z-index:3"><a href="play with vip-music.html"><img src="images/transparent.gif" border=0 width=175 height=91></a></div>

<div id="image3" style="position:absolute; overflow:hidden; left:416px; top:432px; width:175px; height:91px; z-index:4"><a href="top 10 music.html"><img src="images/transparent.gif" border=0 width=175 height=91></a></div>

<div id="image4" style="position:absolute; overflow:hidden; left:599px; top:432px; width:175px; height:91px; z-index:5"><a href="game zone.html"><img src="images/transparent.gif" border=0 width=175 height=91></a></div>

<div id="image5" style="position:absolute; overflow:hidden; left:673px; top:84px; width:55px; height:20px; z-index:6"><a href="about us.html"><img src="images/transparent.gif" border=0 width=55 height=20></a></div>

<div id="image6" style="position:absolute; overflow:hidden; left:650px; top:116px; width:79px; height:20px; z-index:7"><a href="lyrics.html"><img src="images/transparent.gif" border=0 width=79 height=20></a></div>

<div id="image7" style="position:absolute; overflow:hidden; left:650px; top:146px; width:80px; height:22px; z-index:8"><a href="trailers.html"><img src="images/transparent.gif" border=0 width=80 height=22></a></div>

<div id="image8" style="position:absolute; overflow:hidden; left:618px; top:177px; width:117px; height:22px; z-index:9"><a href="online radio.html"><img src="images/transparent.gif" border=0 width=117 height=22></a></div>

<div id="image9" style="position:absolute; overflow:hidden; left:675px; top:208px; width:57px; height:23px; z-index:10"><img src="images/transparent.gif" border=0 width=57 height=23></div>

<div id="image10" style="position:absolute; overflow:hidden; left:641px; top:238px; width:93px; height:20px; z-index:11"><a href="contacts.html"><img src="images/transparent.gif" border=0 width=93 height=20></a></div>

<div id="roundrect2" style="position:absolute; overflow:hidden; left:600px; top:295px; width:175px; height:130px; z-index:12"><img border=0 src="images/roundrect51667564.gif"></div>


</body>
</html>
тва е кода как да го променя?Опитвах но не стана.
 
ами как искаш да се центрира нещо, при положение че тук всичко е зададено с позишъни? Може да ползваш проценти , от сорта на left:50%;
 
ми махни координатната турай му едно


<div align"center">Тук да се намира целия код на страницата</div>



или пробвай това трябва да ти е кодеца:



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
<meta http-equiv="Page-Enter" content="revealTrans(Duration=0,Transition=0)">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<meta name="generator" content="vip-music">
</head>

<style type="text/css">
.ws6 {font-size: 8px;}
.ws7 {font-size: 9.3px;}
.ws8 {font-size: 11px;}
.ws9 {font-size: 12px;}
.ws10 {font-size: 13px;}
.ws11 {font-size: 15px;}
.ws12 {font-size: 16px;}
.ws14 {font-size: 19px;}
.ws16 {font-size: 21px;}
.ws18 {font-size: 24px;}
.ws20 {font-size: 27px;}
.ws22 {font-size: 29px;}
.ws24 {font-size: 32px;}
.ws26 {font-size: 35px;}
.ws28 {font-size: 37px;}
.ws36 {font-size: 48px;}
.ws48 {font-size: 64px;}
.ws72 {font-size: 96px;}
.wpmd {font-size: 13px;font-family: 'Arial';font-style: normal;font-weight: normal;text-decoration: none;}
</style>


<body bgColor="#091114" Link="#FFFFFF" VLink="#FFFFFF" ALink="#FFFFFF">
<div align"center">

<img src="images/index1.jpg"></img>
<img src="images/roundrect50078018.gif"></img>

<div id="html1">
<center><embed src="http://www.mp3asset.com/swf/mp3/minime.swf" quality="high" wmode="transparent" flashvars="myid=8932788&path=2008/04/01&mycolor=0x000000&mycolor2=0x000000&mycolor3=0xFFFFFF&autoplay=true&rand=0&f=3&vol=100&pat=0" width="160" height="68" name="myflashfetish" align="middle"type="application/x-shockwave-flash" /><br><a href="http://www.myflashfetish.com/music-player/" target="_blank"><img src="http://www.myflashfetish.com/images/mffico.gif" title="Make your own playlist!" style="border-style:none;" alt="music player"></a><br />I made this <a href="http://www.myflashfetish.com/playlist/8932788" target="_blank">music player</a> at <a href="http://www.myflashfetish.com" target="_blank">MyFlashFetish</a>.com.<br></p></center><embed height="0" width="0" src="http://counters.gigya.com/wildfire/CIMP/Jmx*PTEyMDcwODExNTAzNjkmcHQ9MTIwNzA4MTE1OTgzMyZwPTE4MDMxJmQ9Jm49.swf" flashvars="" type="application/x-shockwave-flash" /></div>

<a href="play with vip-music.html">
<img src="images/transparent.gif"></img></a>

<a href="top 10 music.html">
<img src="images/transparent.gif"></img></a>

<<a href="game zone.html">
<img src="images/transparent.gif"></img></a>

<a href="about us.html">
<img src="images/transparent.gif"></img></a>

<a href="lyrics.html">
<img src="images/transparent.gif"></img></a>

<a href="trailers.html">
<img src="images/transparent.gif"></img></a>

<a href="online radio.html">
<img src="images/transparent.gif"></img></a>

<img src="images/transparent.gif"></img>

<a href="contacts.html">
<img src="images/transparent.gif"></img></a>

<img src="images/roundrect51667564.gif"></img>
</div>
</body>
</html> :D :shock: :shock: :shock:
 

Back
Горе