Skocz do zawartości

WYŚRODKOWANIE DIV W IE


aniaaal

Recommended Posts

Witam wiem, że tematów podobnych pewnie przewijało się mnóstwo jednak moj problem ciut jest inny.

wydaje mi się, że kod css jest w porządku a jednak div od treści i menu zamiast być wyśrodkowane na stronie to są przesunięte w prawo że div od treści jest ucięty 3/4 a menu w ogole nie widac ktos wie co mozna z tym zrobic zeby pod IE to chodzilo? Bo oczywiscie w innych przegladarkach jest ok

<style type="text/css">
body {font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif; background: #000; text-align:center; margin: 0 auto;}
a img {border: 0;}
#body {margin-top: 360px; margin-left: 170px;  text-align: center; width: 850px; }
#gora {font-size: 16px; font-family: Arial, Helvetica, sans-serif; color: #FFFFFF; text-align: center; /*IE*/}
#tresc {width: 840px /* Zmień na preferowaną */; margin: 0 auto; padding: 5px; background-image: url(images/tlo_2.png); margin-top: 10px; border-top:1px solid #272d07; 

border-bottom:1px solid #272d07; border-right:1px solid #272d07; border-left:1px solid #272d07; text-align: center /*IE*/ }
#tresc .content {margin-left: 20px;margin-right: 20px; padding: 5px; font-size: 12px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF; padding-top: 

10px; padding-bottom: 30px; text-align: center}
#tresc .content a:visited, #tresc .content a:link {text-decoration: none; text-align: center; color:#FFFFFF;}
#tresc .dog_button1 a:hover {font: 32px Georgia; color:#000;text-shadow: #FFF 1px 1px 1px;}
#tresc .dog_button1 a:visited, #tresc .dog_button1 a:link {font: 32px Georgia; color:#000;text-shadow: #FFF 1px 1px 1px;}
#tresc .dog_button3 a:hover {font: 32px Georgia; color:#000;text-shadow: #FFF 1px 1px 1px;}
#tresc .dog_button3 a:visited, #tresc .dog_button3 a:link {font: 32px Georgia; color:#000;text-shadow: #FFF 1px 1px 1px;}
#tresc .dog_button4 a:hover {font: 26px Georgia; color:#000;text-shadow: #FFF 1px 1px 1px;}
#tresc .dog_button4 a:visited, #tresc .dog_button4 a:link {font: 26px Georgia; color:#000;text-shadow: #FFF 1px 1px 1px;}
#stopka {width: 850px; font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF; padding-top: 10px; padding-bottom: 10px; text-align: 

center; margin: 0 auto; margin-top: 10px; margin-bottom: 10px; }
#stopka a:link, #stopka a:visited { text-decoration: none; text-align: center; color:#FFFFFF;}
#stopka a:hover {text-decoration: none; text-align: center; font-weight: normal; color:#c3da57;    border-bottom: dotted 1px #c3da57;}
.menu4 a, .menu4 a:link, .menu4 a:visited, .menu4 a:hover { outline: none;}
.menu4, .menu4 ul{ margin: 0;padding: 0;border: 0;list-style-type: none;display: block;}
.menu4 li{margin: 0;padding: 0;border: 0;display: block;float: left;position: relative;z-index: 5;background: none;}
.menu4{min-height: 0;position:relative;padding: 4px 4px 4px 4px;float: right;}
ul.menu4{float: right;}
.menu1{position: relative;margin:0 auto;min-height: 34px;z-index: 100;margin-top: 0;margin-bottom: 0;}
.menu2{position:absolute;width:100%;}
.menu3{position: relative;display: block;float: right;width: auto;height: 34px;}
.menu4 a{position: relative;display: block;overflow: hidden;height: 26px;cursor: pointer;font-weight: bold;font-size: 14px;text-align: left;text-decoration: none;}
.menu4 ul li{margin:0;clear: both;}
.menu4 a .m, .menu4 ul a, .menu4 a:link, .menu4 a:visited, .menu4 a:hover{font-weight: bold;font-size: 14px;text-align: left;text-decoration: none;}
.menu4 a .m{color: #FFFFFF;padding: 0 4px;margin: 0 9px;line-height: 26px;text-align: center;}
.menu4 a:hover .m{color: #c3da57;}
.menu4 li:hover a .m{color: #c3da57;}
.menu4 li:hover>a .m{color: #c3da57;}
.menu4 a.active .m{color: #0F0801;}</style>

<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
  <meta http-equiv="Content-type"
 content="text/html; charset=windows-1250">
  <meta http-equiv="Content-Language" content="pl">
  <meta name="Keywords"
 content="">
  <meta name="Author" content="admin">
  <title></title>
  <link rel="Stylesheet" type="text/css"
 href="../style.css">
  <meta http-equiv="Content-Type"
 content="text/html; charset=iso-8859-2">
</head>
<body
 style="margin: 0pt; padding: 0pt; width: 100%; height: 100%; overflow: hidden;">
<center></center>
<div
 style="position: absolute; z-index: 2; width: 100%; height: 100%; overflow: auto;">
<div style="margin: 0px;">
<div id="top">
<div id="body">
<div id="gora">
<div class="menu1">
<div class="menu2">
<div class="menu3"></div>
<ul class="menu4">
  <li><a href="index.html"><span class="m">Home</span></a></li>
  <li><a href="news.html"><span class="m">News</span></a>
  </li>
  <li><a href="females.html"><span class="m">Females</span></a></li>
  <li><a href="males.html"><span class="m">Males</span></a></li>
  <li><a href="puppies.html"><span class="m">Puppies</span></a></li>
  <li><a href="links.html"><span class="m">Links</span></a></li>
  <li><a href="contact.html"><span class="m">Contact</span></a></li>
</ul>
</div>
</div>
</div>
</div>
<div="body">
<center>
<div id="tresc">
<div class="content"><!--tresc-->
<center></ br>
</ br>
</div>
</div>
</center</center>
</div>
<!--/tresc-->
</div>
</div>
<div id="stopka">
</div>
</div>
<div><img src="../images/tlo1.jpg" alt=""
 style="position: absolute; left: 0pt; top: 0pt; z-index: 1;"></div>
</body>
</html>

wygląda to tak mniej więcej - menu w ogole gdzies zjechalo i go nie widać

1.png

a powinno tak:

2.png

  • Upvote 9
Link do komentarza
Udostępnij na innych stronach

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gość
Odpowiedz...

×   Wkleiłeś treść z formatowaniem.   Usuń formatowanie

  Only 75 emoji are allowed.

×   Twój link będzie automatycznie osadzony.   Wyświetlać jako link

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Wczytywanie...
×
×
  • Utwórz nowe...