Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Reklamy Adsense zasłania rozwijane menu
hiper0007
post 15.02.2017, 13:30:56
Post #1





Grupa: Zarejestrowani
Postów: 55
Pomógł: 0
Dołączył: 6.06.2016

Ostrzeżenie: (0%)
-----


Witam oto kod menu

  1.  
  2. <div id="top">
  3.  
  4. <ol class="a">
  5. <li><a href="welcome-to-silent-hill">Strona Główna</a></li>
  6. <li><a href="#">Silent Hill</a>
  7. <ul class="a1">
  8. <li><a href="welcome-to-silent-hill-1">Historia</a></li>
  9. <li><a href="silent-hill-harry-mason">Postacie</a></li>
  10. <li><a href="silent-hill-weapons-bronie">Bronie</a></li>
  11. <li><a href="silent-hill-potwory-bossowie">Potwory</a></li>
  12. <li><a href="silent-hill-zakonczenia-endings">Zakończenia</a></li>
  13. <li><a href="silent-hill-soundtracks">Soundtracks</a></li>
  14. <li><a href="silent-hill-galeria-screeny">Galeria</a></li>
  15. <li><a href="solucja-silent-hill-1">Solucja</a></li>
  16. </ul></li>
  17. <li><a href="#">Silent Hill 2</a>
  18. <ul class="a1">
  19. <li><a href="welcome-to-silent-hill-2">Historia</a></li>
  20. <li><a href="silent-hill-2-james-sunderland">Postacie</a></li>
  21. <li><a href="silent-hill-2-weapons-bronie">Bronie</a></li>
  22. <li><a href="silent-hill-2-potwory-bossowie">Potwory</a></li>
  23. <li><a href="silent-hill-2-zakonczenia-endings">Zakończenia</a></li>
  24. <li><a href="silent-hill-2-soundtracks">Soundtracks</a></li>
  25. <li><a href="silent-hill-2-galeria-screeny">Galeria</a></li>
  26. <li><a href="solucja-silent-hill-2">Solucja</a></li>
  27. </ul></li>
  28. <li><a href="#">Silent Hill 3</a>
  29. <ul class="a1">
  30. <li><a href="welcome-to-silent-hill-3">Historia</a></li>
  31. <li><a href="silent-hill-3-heather-morris">Postacie</a></li>
  32. <li><a href="silent-hill-3-weapons-bronie">Bronie</a></li>
  33. <li><a href="silent-hill-3-potwory-bossowie">Potwory</a></li>
  34. <li><a href="silent-hill-3-zakonczenia-endings">Zakończenia</a></li>
  35. <li><a href="silent-hill-3-soundtracks">Soundtracks</a></li>
  36. <li><a href="silent-hill-3-galeria-screeny">Galeria</a></li>
  37. <li><a href="solucja-silent-hill-3">Solucja</a></li>
  38. </ul></li>
  39. <li><a href="#">SH 4: The Room</a>
  40. <ul class="a1">
  41. <li><a href="welcome-to-silent-hill-4-the-room">Historia</a></li>
  42. <li><a href="silent-hill-4-the-room-henry-townshend">Postacie</a></li>
  43. <li><a href="silent-hill-4-the-room-weapons-bronie">Bronie</a></li>
  44. <li><a href="silent-hill-4-the-room-potwory-bossowie">Potwory</a></li>
  45. <li><a href="silent-hill-4-the-room-zakonczenia-endings">Zakończenia</a></li>
  46. <li><a href="silent-hill-4-the-room-soundtracks">Soundtracks</a></li>
  47. <li><a href="silent-hill-4-the-room-galeria-screeny">Galeria</a></li>
  48. <li><a href="solucja-silent-hill-4-the-room">Solucja</a></li>
  49. </ul></li>
  50. <li><a href="#">SH: Origins</a>
  51. <ul class="a1">
  52. <li><a href="welcome-to-silent-hill-origins">Historia</a></li>
  53. <li><a href="silent-hill-origins-travis-grady">Postacie</a></li>
  54. <li><a href="silent-hill-origins-weapons-bronie">Bronie</a></li>
  55. <li><a href="silent-hill-origins-potwory-bossowie">Potwory</a></li>
  56. <li><a href="silent-hill-origins-zakonczenia-endings">Zakończenia</a></li>
  57. <li><a href="silent-hill-origins-soundtracks">Soundtracks</a></li>
  58. <li><a href="silent-hill-origins-galeria-screeny">Galeria</a></li>
  59. <li><a href="solucja-silent-hill-origins">Solucja</a></li>
  60. </ul></li>
  61. <li><a href="#">SH: Homecoming</a>
  62. <ul class="a1">
  63. <li><a href="welcome-to-silent-hill-homecoming">Historia</a></li>
  64. <li><a href="silent-hill-homecoming-alex-shepherd">Postacie</a></li>
  65. <li><a href="silent-hill-homecoming-weapons-bronie">Bronie</a></li>
  66. <li><a href="silent-hill-homecoming-potwory-bossowie">Potwory</a></li>
  67. <li><a href="silent-hill-homecoming-zakonczenia-endings">Zakończenia</a></li>
  68. <li><a href="silent-hill-homecoming-soundtracks">Soundtracks</a></li>
  69. <li><a href="silent-hill-homecoming-galeria-screeny">Galeria</a></li>
  70. <li><a href="solucja-silent-hill-homecoming">Solucja</a></li>
  71. </ul></li>
  72. <li><a href="#">Shattered Memories</a>
  73. <ul class="a1">
  74. <li><a href="welcome-to-silent-hill-shattered-memories">Historia</a></li>
  75. <li><a href="silent-hill-shattered-memories-harry-mason">Postacie</a></li>
  76. <li><a href="silent-hill-shattered-memories-weapons-bronie">Bronie</a></li>
  77. <li><a href="silent-hill-shattered-memories-potwory-bossowie">Potwory</a></li>
  78. <li><a href="silent-hill-shattered-memories-zakonczenia-endings">Zakończenia</a></li>
  79. <li><a href="silent-hill-shattered-memories-soundtracks">Soundtracks</a></li>
  80. <li><a href="silent-hill-shattered-memories-galeria-screeny">Galeria</a></li>
  81. <li><a href="solucja-silent-hill-shattered-memories">Solucja</a></li>
  82. </ul></li>
  83. <li><a href="#">SH: Downpour</a>
  84. <ul class="a1">
  85. <li><a href="welcome-to-silent-hill-downpour">Historia</a></li>
  86. <li><a href="silent-hill-downpour-murphy-pendleton">Postacie</a></li>
  87. <li><a href="silent-hill-downpour-weapons-bronie">Bronie</a></li>
  88. <li><a href="silent-hill-downpour-potwory-bossowie">Potwory</a></li>
  89. <li><a href="silent-hill-downpour-zakonczenia-endings">Zakończenia</a></li>
  90. <li><a href="silent-hill-downpour-soundtracks">Soundtracks</a></li>
  91. <li><a href="silent-hill-downpour-galeria-screeny">Galeria</a></li>
  92. <li><a href="solucja-silent-hill-downpour">Solucja</a></li>
  93. </ul></li>
  94.  
  95. </ol>
  96. </div>
  97.  
  98.  


Oto kod reklamy:

  1.  
  2.  
  3. <div id="google_ad_banner">
  4.  
  5. <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
  6. <!-- Reklama SHH3-->
  7. <ins class="adsbygoogle"
  8. style="display:inline-block;width:200px;height:200px"
  9. (adsbygoogle = window.adsbygoogle || []).push({});
  10. </script>
  11.  
  12. </div>
  13.  
  14.  


Oto kod JS przyklejania menu do górnej belki



<script>$(document).ready(function() {
var stickyNavTop = $('#top').offset().top;

var stickyNav = function(){
var scrollTop = $(window).scrollTop();

if (scrollTop > stickyNavTop) {
$('#top').addClass('sticky');
} else {
$('#top').removeClass('sticky');
}
};

stickyNav();

$(window).scroll(function() {

stickyNav();
});
});

$(window).load(function(){

$('.anime').fadeOut(3000).delay(1000).fadeIn(3000);
});

</script>




Oto kod CSS:

  1.  
  2. #google_ad_banner
  3. {
  4. z-index: -99999;
  5. }
  6.  
  7. #top
  8. {
  9. position: relative;
  10. z-index: 99999;
  11.  
  12. }
  13.  
  14.  
  15.  
  16. .sticky
  17. {
  18. width:100%;
  19. position:fixed;
  20. top:0;
  21. z-index: 99999;
  22.  
  23. }
  24.  
  25.  



Menu w tym momencie nie jest zasłonięte jak dodałem (position: relative;) ale nie działa przyklejanie menu do górnej belki. Jak usunę tą opcje (position: relative;) to menu jest zasłonięta przez reklamy ale działa przyklejanie menu. Jak połączyć te dwie opcje razem.

Ten post edytował hiper0007 15.02.2017, 13:42:18
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 28.03.2024 - 20:02