Навигационое меню

Статус
В этой теме нельзя размещать новые ответы.

Mr.Tokio

Гуру форума
Регистрация
17 Дек 2007
Сообщения
289
Реакции
60
Собственно проблемма есть меню навигации которое должно выборе должно светится(выбор другой картики)...

Код в Index.php
HTML:
<script>

        if (document.images) {

          var img = new Object();

          img["about"] = new Image(127, 81);

          img["about"].src = "<?=$this->baseurl ?>/templates/<?=$this->template ?>/images/pabout.jpg";

          img["services"] = new Image(127, 81);

          img["services"].src = "<?=$this->baseurl ?>/templates/<?=$this->template ?>/images/pservices.jpg";

          img["projects"] = new Image(127, 81);

          img["projects"].src = "<?=$this->baseurl ?>/templates/<?=$this->template ?>/images/pprojects.jpg";

          img["partners"] = new Image(127, 81);

          img["partners"].src = "<?=$this->baseurl ?>/templates/<?=$this->template ?>/images/ppartners.jpg";

          img["itconsulting"] = new Image(127, 81);

          img["itconsulting"].src = "<?=$this->baseurl ?>/templates/<?=$this->template ?>/images/pitconsulting.jpg";

          img["contacts"] = new Image(127, 81);

          img["contacts"].src = "<?=$this->baseurl ?>/templates/<?=$this->template ?>/images/pcontacts.jpg";

          img["about_over"] = new Image(127, 81);

          img["about_over"].src = "<?=$this->baseurl ?>/templates/<?=$this->template ?>/images/pabout_over.jpg";

          img["services_over"] = new Image(127, 81);

          img["services_over"].src = "<?=$this->baseurl ?>/templates/<?=$this->template ?>/images/pservices_over.jpg";

          img["projects_over"] = new Image(127, 81);

          img["projects_over"].src = "<?=$this->baseurl ?>/templates/<?=$this->template ?>/images/pprojects_over.jpg";

          img["partners_over"] = new Image(127, 81);

          img["partners_over"].src = "<?=$this->baseurl ?>/templates/<?=$this->template ?>/images/ppartners_over.jpg";

          img["itconsulting_over"] = new Image(127, 81);

          img["itconsulting_over"].src = "<?=$this->baseurl ?>/templates/<?=$this->template ?>/images/pitconsulting_over.jpg";

          img["contacts_over"] = new Image(127, 81);

          img["contacts_over"].src = "<?=$this->baseurl ?>/templates/<?=$this->template ?>/images/pcontacts_over.jpg";

        }



        var menuItem = document.getElementById('current');

        if (menuItem) {

          var itemA = menuItem.childNodes[0];

          var itemClassName = menuItem.className;

          var itemClassNameSplit = itemClassName.split(' ');

          var itemID = itemClassNameSplit[1];

          itemA.className = itemID + "_active";

        }

      </script>

и собственно template.css
HTML:
.menu li a:hover {

	background: #393839 url('../images/bgtop.gif');

	text-decoration: none;

}



.menu li.item57 a { background: transparent url('../images/pabout.jpg') left bottom no-repeat; }

.menu li.item27 a { background: transparent url('../images/pservices.jpg') left bottom no-repeat; }

.menu li.item2 a { background: transparent url('../images/pprojects.jpg') left bottom no-repeat; }

.menu li.item37 a { background: transparent url('../images/ppartners.jpg') left bottom no-repeat; }

.menu li.item55 a { background: transparent url('../images/pitconsulting.jpg') left bottom no-repeat; }

.menu li.item56 a { background: transparent url('../images/pcontacts.jpg') left bottom no-repeat; }



.menu li.item57 a:hover { background: #393839 url('../images/pabout_over.jpg') left bottom no-repeat; }

.menu li.item27 a:hover { background: #393839 url('../images/pservices_over.jpg') left bottom no-repeat; }

.menu li.item2 a:hover { background: #393839 url('../images/pprojects_over.jpg') left bottom no-repeat; }

.menu li.item37 a:hover { background: #393839 url('../images/ppartners_over.jpg') left bottom no-repeat; }

.menu li.item55 a:hover { background: #393839 url('../images/pitconsulting_over.jpg') left bottom no-repeat; }

.menu li.item56 a:hover { background: #393839 url('../images/pcontacts_over.jpg') left bottom no-repeat; }



.active {

	background: #393839;

}



.menu li a.item57_active { background: #393839 url('../images/pabout_over.jpg') left bottom no-repeat; }

.menu li a.item27_active { background: #393839 url('../images/pservices_over.jpg') left bottom no-repeat; }

.menu li a.item2_active { background: #393839 url('../images/pprojects_over.jpg') left bottom no-repeat; }

.menu li a.item37_active { background: #393839 url('../images/ppartners_over.jpg') left bottom no-repeat; }

.menu li a.item55_active { background: #393839 url('../images/pitconsulting_over.jpg') left bottom no-repeat; }

.menu li a.item56_active { background: #393839 url('../images/pcontacts_over.jpg') left bottom no-repeat; }

проблема в том что на IE пашет нормально,а на остальных браузерах нет..

пример можо тут _l-ts.colorpictures.ru_

Помоги плиз!!!!
 
Странно - в хроме и опере - вполне на ура.
Кстати, менюшка очень приятственная...
 
template.css (первый вариант)

Код:
.menu li a:hover {

	background: #393839 url('../images/bgtop.gif');

	text-decoration: none;

}



.menu li.item57 a { background: transparent url('../images/pabout.jpg') left bottom no-repeat; }
.menu li.item27 a { background: transparent url('../images/pservices.jpg') left bottom no-repeat; }
.menu li.item2 a { background: transparent url('../images/pprojects.jpg') left bottom no-repeat; }
.menu li.item37 a { background: transparent url('../images/ppartners.jpg') left bottom no-repeat; }
.menu li.item55 a { background: transparent url('../images/pitconsulting.jpg') left bottom no-repeat; }
.menu li.item56 a { background: transparent url('../images/pcontacts.jpg') left bottom no-repeat; }


.menu li.item57 a:hover { background: #393839 url('../images/pabout_over.jpg') left bottom no-repeat; }
.menu li.item27 a:hover { background: #393839 url('../images/pservices_over.jpg') left bottom no-repeat; }
.menu li.item2 a:hover { background: #393839 url('../images/pprojects_over.jpg') left bottom no-repeat; }
.menu li.item37 a:hover { background: #393839 url('../images/ppartners_over.jpg') left bottom no-repeat; }
.menu li.item55 a:hover { background: #393839 url('../images/pitconsulting_over.jpg') left bottom no-repeat; }
.menu li.item56 a:hover { background: #393839 url('../images/pcontacts_over.jpg') left bottom no-repeat; }


.active {
	background: #393839;
}


.menu li a.active.item57 { background: #393839 url('../images/pabout_over.jpg') left bottom no-repeat; }
.menu li a.active.item27 { background: #393839 url('../images/pservices_over.jpg') left bottom no-repeat; }
.menu li a.active.item2 { background: #393839 url('../images/pprojects_over.jpg') left bottom no-repeat; }
.menu li a.active.item37 { background: #393839 url('../images/ppartners_over.jpg') left bottom no-repeat; }
.menu li a.active.item55 { background: #393839 url('../images/pitconsulting_over.jpg') left bottom no-repeat; }
.menu li a.active.item56 { background: #393839 url('../images/pcontacts_over.jpg') left bottom no-repeat; }

template.css (второй вариант)

Код:
.menu li a:hover {

	background: #393839 url('../images/bgtop.gif');

	text-decoration: none;

}



.menu li.item57 a { background: transparent url('../images/pabout.jpg') left bottom no-repeat; }
.menu li.item27 a { background: transparent url('../images/pservices.jpg') left bottom no-repeat; }
.menu li.item2 a { background: transparent url('../images/pprojects.jpg') left bottom no-repeat; }
.menu li.item37 a { background: transparent url('../images/ppartners.jpg') left bottom no-repeat; }
.menu li.item55 a { background: transparent url('../images/pitconsulting.jpg') left bottom no-repeat; }
.menu li.item56 a { background: transparent url('../images/pcontacts.jpg') left bottom no-repeat; }


.menu li.item57 a:hover { background: #393839 url('../images/pabout_over.jpg') left bottom no-repeat; }
.menu li.item27 a:hover { background: #393839 url('../images/pservices_over.jpg') left bottom no-repeat; }
.menu li.item2 a:hover { background: #393839 url('../images/pprojects_over.jpg') left bottom no-repeat; }
.menu li.item37 a:hover { background: #393839 url('../images/ppartners_over.jpg') left bottom no-repeat; }
.menu li.item55 a:hover { background: #393839 url('../images/pitconsulting_over.jpg') left bottom no-repeat; }
.menu li.item56 a:hover { background: #393839 url('../images/pcontacts_over.jpg') left bottom no-repeat; }


.active {
	background: #393839;
}


.menu li a.item57.active { background: #393839 url('../images/pabout_over.jpg') left bottom no-repeat; }
.menu li a.item27.active { background: #393839 url('../images/pservices_over.jpg') left bottom no-repeat; }
.menu li a.item2.active { background: #393839 url('../images/pprojects_over.jpg') left bottom no-repeat; }
.menu li a.item37.active { background: #393839 url('../images/ppartners_over.jpg') left bottom no-repeat; }
.menu li a.item55.active { background: #393839 url('../images/pitconsulting_over.jpg') left bottom no-repeat; }
.menu li a.item56.active { background: #393839 url('../images/pcontacts_over.jpg') left bottom no-repeat; }

Добавлено через 7 минут
Вот третий вариант

Код:
.menu li a:hover {

	background: #393839 url('../images/bgtop.gif');

	text-decoration: none;

}



.menu li.item57 a { background: transparent url('../images/pabout.jpg') left bottom no-repeat; }
.menu li.item27 a { background: transparent url('../images/pservices.jpg') left bottom no-repeat; }
.menu li.item2 a { background: transparent url('../images/pprojects.jpg') left bottom no-repeat; }
.menu li.item37 a { background: transparent url('../images/ppartners.jpg') left bottom no-repeat; }
.menu li.item55 a { background: transparent url('../images/pitconsulting.jpg') left bottom no-repeat; }
.menu li.item56 a { background: transparent url('../images/pcontacts.jpg') left bottom no-repeat; }


.menu li.item57 a:hover { background: #393839 url('../images/pabout_over.jpg') left bottom no-repeat; }
.menu li.item27 a:hover { background: #393839 url('../images/pservices_over.jpg') left bottom no-repeat; }
.menu li.item2 a:hover { background: #393839 url('../images/pprojects_over.jpg') left bottom no-repeat; }
.menu li.item37 a:hover { background: #393839 url('../images/ppartners_over.jpg') left bottom no-repeat; }
.menu li.item55 a:hover { background: #393839 url('../images/pitconsulting_over.jpg') left bottom no-repeat; }
.menu li.item56 a:hover { background: #393839 url('../images/pcontacts_over.jpg') left bottom no-repeat; }


.active {
	background: #393839;
}


.menu li#current a.item57 { background: #393839 url('../images/pabout_over.jpg') left bottom no-repeat; }
.menu li#current a.item27 { background: #393839 url('../images/pservices_over.jpg') left bottom no-repeat; }
.menu li#current a.item2 { background: #393839 url('../images/pprojects_over.jpg') left bottom no-repeat; }
.menu li#current a.item37 { background: #393839 url('../images/ppartners_over.jpg') left bottom no-repeat; }
.menu li#current a.item55 { background: #393839 url('../images/pitconsulting_over.jpg') left bottom no-repeat; }
.menu li#current a.item56 { background: #393839 url('../images/pcontacts_over.jpg') left bottom no-repeat; }
 
Рус спасибо конечно..но как ты видел из переписки не помогло...
 
Статус
В этой теме нельзя размещать новые ответы.
Назад
Сверху