Jump to content
  • 0

Как сделать верно для двух браузеров?


Copycat
 Share

Question

В IE и Firefox частично правильно отображается страница.

Нужно чтоб картинки полностью отображались и страница располагалась по центру.

Подскажите, что я не верно делаю?

Вот код:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<style type="text/css">

body {
background-color: 696969;
margin: 0px;
width: 900px;
margin-right: auto;
margin-left: auto;
font-family: tahoma;
font-size: 16px;
}

#menu-left {
width: 140px;
vertical-align: top;
}

#content {
width: 630px;
background-color: darkgray;
}

#menu-right {
width: 130px;
}

a {
width: 130px;
height: 40px;
background-image: url(button_off.png);
background-repeat: no-repeat;
padding-left: 15px;
padding-top: 9px;
}

a:hover {
width: 130px;
height: 40px;
background-image: url(button_on.png);
}
</style>
<title></title>
</head>
<body>
<table border="0" width="100%" align="center" height="100%">
<tr>
<td id="menu-left">
<a href="#">ya</a>

<a href="#">samoe</a>

<a href="#">luchshee</a>

<a href="#">meny</a>

<a href="#">toka</a>

<a href="#">kodirovki</a>

<a href="#">nado</a>

<a href="#">postavit' =)</a>
</td>
<td id="content">CONTENT</td>
<td id="menu-right">MENU RIGHT</td>
</tr>
</table>
</body>
</html>

Вид в браузерах:

http://img392.imageshack.us/img392/5976/ienu8.jpg

http://img80.imageshack.us/img80/3302/ffvw9.jpg

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Ваша ишибка была использование margin:auto - так вы браузерам даете возможность самим менять отступы, а они их не одинаково меняют. Может не в полне грамотно написал, но суть та! Вот так правильно будет.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<style type="text/css">

body, html {
height:100%;
background-color: 696969;
margin: 0px;
padding:0px;
width: 100%;
font-family: tahoma;
font-size: 16px;
}

#menu-left {
width: 140px;
vertical-align: top;
}

#content {
width: 630px;
background-color: darkgray;
vertical-align:top;
}

#menu-right {
width: 130px;
vertical-align:top;
}

a {
width: 130px;
height: 40px;
background-image: url(button_off.png);
background-repeat: no-repeat;
padding-left: 15px;
padding-top: 9px;
}

a:hover {
width: 130px;
height: 40px;
background-image: url(button_on.png);
background-repeat: no-repeat;
padding-left: 15px;
padding-top: 9px;
}
.table {
margin-left:50px;
margin-right:50px;
width:90%;
height:100%;
}
</style>
<title></title>
</head>
<body>
<table class="table" cellpadding="0" cellspacing="0">
<tr>
<td id="menu-left">
<a href="#">ya</a>

<a href="#">samoe</a>

<a href="#">luchshee</a>

<a href="#">meny</a>

<a href="#">toka</a>

<a href="#">kodirovki</a>

<a href="#">nado</a>

<a href="#">postavit' =)</a>
</td>
<td id="content">CONTENT</td>
<td id="menu-right">MENU RIGHT</td>
</tr>
</table>
</body>
</html>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

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

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy