Jump to content
  • 0

Проблемы с IE 8


Bizon4ik
 Share

Question

Всем доброе время суток.

Я набрал следующий код:

HTML


<body>
<div class="header">
<a href="#"> <img src="images/logo.png" alt="internationa"</a>
<ul class="menu">
<li ><a href="#">Home</a></li>
<li ><a href="#">Portfolio</a></li>
<li ><a href="#">Become a member</a></li>
<li ><a href="#">Patners</a></li>
<li ><a href="#">About us</a></li>
<li ><a href="#">Contacts</a></li>
</ul>
</div>

CSS


body {
margin:0;
padding:0;
}

.header {
border:black solid 1px;
margin:0 auto;
width:960px;
}
a img {border:none;}

.menu {
background: #afafaf;

}
.menu li {
float:left;
width:150px;
border:none;
}
.menu a {
display:block;
}

В FireFox отображается так: 2871202m.jpg

А в IE 8 так: 2866082m.jpg

Откуда в IE взялся еще один пустой пункт списка?

И почему не сработал background: #afafaf; ?

Заранее спасибо.

Edited by Bizon4ik
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0


<a href="#"><img src="images/logo.png" alt="internationa"</a>

Где закрытие тега IMG?


<a href="#"><img src="images/logo.png" alt="internationa"/></a>

После этого все сразу становится нормально


.menu {
background: #afafaf;
overflow: hidden; /* Добавить для "срабатывания" фона */
}

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