Jump to content
  • 0

перекрытие слоев


zloi-kasper
 Share

Question

подскажите как победить такую конструкцию?

есть картинка с z-index: 1;

и есть меню с z-index: 2; но в том месте где меню в зоне картинки оно не работает, т.е. получается что часть меню становиться не активным

по логике ведь меню выше слоя картинки

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0
подскажите как победить такую конструкцию?

есть картинка с z-index: 1;

и есть меню с z-index: 2; но в том месте где меню в зоне картинки оно не работает, т.е. получается что часть меню становиться не активным

по логике ведь меню выше слоя картинки

А где код? На основании чего мы тебе подсказывать будем?

Link to comment
Share on other sites

  • 0

<script language="javascript" type="text/javascript">

function Show(x) {document.getElementById('nav' + x).style.display = 'block';}

function Close(x) {document.getElementById('nav' + x).style.display = 'none';}

</script>

<div id="menu">

<div id="navigation" style="position: relative; z-index: 1; ">

<ul>

<li class="blue" style="margin-left:-10px;" onMouseMove="Close(1);Close(2);"><div id="menuosn"><a href="" class="menu">Об организации</a></div></li>

<li class="blue" style="margin-left:35px;" onMouseMove="Close(1);Close(2);"><div id="menuosn"><a href="" class="menu">Контакты</a></div></li>

<li class="blue" style="margin-left:60px;" onmouseover="Show(2);" onMouseMove="Close(1);"><div id="menuosn"><a href="" class="menu">Судьи</a></div></li>

<li class="blue" style="margin-left:35px;" onmouseover="Show(1);" onMouseMove="Close(2);"><div id="menuosn"><a href="" class="menu">Конкурсы</a></div></li>

<li class="blue" style="margin-left:50px;" onMouseMove="Close(1);Close(2);"><div id="menuosn"><a href="" class="menu">Новости</a></div></li>

<li class="blue" style="margin-left:40px;" onMouseMove="Close(1);Close(2);"><div id="menuosn"><a href="" class="menu">Гостевая книга</a></div></li>

</ul>

</div>

<img src="img/kubok.png" alt="Kubok" border="0" width="208" height="291" style="position: relative; z-index: 2; top: -60px; left: -90px;">

<div id="nav2" style="margin-top:-234px;">

<ul>

<li class="red" style="margin-right: 26px;"><div id="menuosn2" style="z-index: 4;"><a href="" class="menu-kr" style="margin-left: 36px;">Почетные судьи</a></div></li>

<li class="red" style="width: 210px;"><div id="menuosn2"><a href="" class="menu-kr" style="margin-left: 20px;">Действительные судьи</a></div></li>

<li class="red" style="margin-right: 76px;"><div id="menuosn2"><a href="" class="menu-kr" style="margin-left: 15px;">Стажеры</a></div></li>

<li class="red" style="margin-right: 36px;"><div id="menuosn2"><a href="" class="menu-kr" style="margin-left: 10px;">Как стать судьей</a></div></li>

</ul>

</div>

<div id="nav1" style="margin-top:-211px;">

<ul>

<li class="red" style="width: 150px;"><div id="menuosn2"><a href="" class="menu-kr" style="margin-left: 28px;">Дата и условия</a></div></li>

<li class="red" style="width: 190px;"><div id="menuosn2"><a href="" class="menu-kr" style="margin-left: 15px;">Результаты конкурсов</a></div></li>

<li class="red" style="width: 175px;"><div id="menuosn2"><a href="" class="menu-kr" style="margin-left: 12px;">Работы победителей</a></div></li>

</ul>

</div>

</div>

если кто хочет увидеть исходник вот он http://www.nailexpert.ru/1/

Link to comment
Share on other sites

  • 0

что ж вы путаете?

есть картинка с z-index: 1;

и есть меню с z-index: 2; но в том месте где меню в зоне картинки оно не работает, т.е. получается что часть меню становиться не активным

<div id="navigation" style="position: relative; z-index: 1; ">

...

<img src="img/kubok.png" alt="Kubok" border="0" width="208" height="291" style="position: relative; z-index: 2; top: -60px; left: -90px;">

Link to comment
Share on other sites

  • 0

z-index - ы расчитываются от родительского элемента, т.е. если Вы перекрываете картинкой div id="navigation", то то что в этом диве никак не будет выше картинки, даже если Вы сделаете для <a> в меню z-index - ы = 250

тут структуру переделывать надо.

Link to comment
Share on other sites

  • 0

я бы сделала так:

<div со списком, в котором  только фоновые рисунки меню, позишн релятив>
<div с кубком, позишн абсолют></div>
<div со списокм с текстовым меню, позишн абсолют></div>
</div>

и без z-index-ов

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