Witam

Czasami na stronie jest potrzeba wyswietlenia czegos tak, aby nie zajmowalo miejsca w pionie, ale wyswietlalo sie cale. W tym celu wymyslilem sobie taka sztuczke, zeby wybrany za duzy element ujac w div z "height: 0px;" w style.

PS: [kod gotowy do uzytku - wystarczy otworzyc w przegladarce aby zobaczyc o co mi chodzi]

tak:
  1.  
  2.  
  3. #top_menu
  4. {
  5. height: 15px;
  6. }
  7.  
  8. a.menu_top
  9. {
  10. color: #a7a7a7;
  11. font-weight: bold;
  12. font-size: 14px;
  13. }
  14.  
  15. a.menu_top:hover
  16. {
  17. color: #ff7200;
  18. }
  19.  
  20. div.menu_link
  21. {
  22. float: left;
  23. height: 40px;
  24. text-align: center;
  25. padding-left: 10px;
  26. height: 120px; /* do efektu js */
  27. overflow: hidden; /* do efektu js */
  28. }
  29.  
  30.  
  31. <script type="text/javascript">
  32.  
  33. var menuTop_thisPosition = 0; //home
  34. var menuTop_newPosition = null;
  35. var menuTop_animate_margin = 0;
  36. var menuTop_moving = 0;
  37. var menuTop_opacity = 1;
  38.  
  39. function menuTop_chpos(newPosition)
  40. {
  41. menuTop_newPosition = newPosition; //zapisuje nowa pozycje do zmiennej globalnej
  42.  
  43. if(menuTop_moving != 1)
  44. {
  45. menuTop_moving = 1;
  46. menuTop_animate_interval = setInterval(menuTop_animate, 25);
  47. }
  48. }
  49.  
  50. function menuTop_setNewPosition()
  51. {
  52. document.getElementById('menuTop_link'+menuTop_thisPosition+'_arrow').style.display = 'none';
  53. document.getElementById('menuTop_link'+menuTop_newPosition+'_arrow').style.display = 'block';
  54.  
  55. menuTop_thisPosition = menuTop_newPosition;
  56. }
  57.  
  58. function menuTop_animate()
  59. {
  60. menuTop_animate_margin += 10;
  61. menuTop_opacity -= 0.08;
  62.  
  63. if(menuTop_animate_margin < 120)
  64. {
  65. document.getElementById('menuTop_link'+menuTop_thisPosition+'_arrow').style.margin = menuTop_animate_margin+'px auto 0px auto';
  66. document.getElementById('menuTop_link'+menuTop_thisPosition+'_arrow').style.opacity = menuTop_opacity;
  67. }
  68. else
  69. {
  70. clearInterval(menuTop_animate_interval);
  71. menuTop_animate_margin = 0;
  72. document.getElementById('menuTop_link'+menuTop_thisPosition+'_arrow').style.margin = '0px auto 0px auto';
  73. menuTop_opacity = 1;
  74. document.getElementById('menuTop_link'+menuTop_thisPosition+'_arrow').style.opacity = 1;
  75. menuTop_setNewPosition();
  76. menuTop_moving = 0;
  77. }
  78. }
  79.  
  80.  
  81. 1.<br><Br>
  82.  
  83. <div style="width: 600px;">
  84. <div style="height: 10px; float: left;">
  85. <div id="menuTop_link0" class="menu_link"><a onclick="menuTop_chpos(0);" class="menu_top" href="#">link1<br><img id="menuTop_link0_arrow" style="display: block; margin: 0px auto 0px auto;" src="web/img/menu_arrow.png"></a></div>
  86. <div id="menuTop_link1" class="menu_link"><a onclick="menuTop_chpos(1);" class="menu_top" href="#">link2<br><img id="menuTop_link1_arrow" style="display: none; margin: 0px auto 0px auto;" src="web/img/menu_arrow.png"></a></div>
  87. <div id="menuTop_link2" class="menu_link"><a onclick="menuTop_chpos(2);" class="menu_top" href="#">link3<br><img id="menuTop_link2_arrow" style="display: none; margin: 0px auto 0px auto;" src="web/img/menu_arrow.png"></a></div>
  88. <div id="menuTop_link3" class="menu_link"><a onclick="menuTop_chpos(3);" class="menu_top" href="#">link4<br><img id="menuTop_link3_arrow" style="display: none; margin: 0px auto 0px auto;" src="web/img/menu_arrow.png"></a></div>
  89. </div>
  90. </div>
  91. <br>
  92. <div style="width: 600px;">
  93. <div>
  94. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
  95. </div></div>
  96.  
  97.  
  98. 2. <br><br>
  99.  
  100. <div style="height: 5px;">
  101. <div>sa<br>sdasf<br>s</div>
  102. </div>
  103. dadada
  104.  
  105.  


Co w chrome, Epiphany, Firefoxie dziala ok - czyli tak:


Ale Opera nie daje sie nabrac na ta sztuczke i wychodzi cos takiego


Co sypie mi cala strone. Da sie to jakos inaczej obejsc? Probowalem kilku sposobow, ale opera ich nie trawi.
Wole zmienic pol htmla niz wypuscic strone, ktora nie dziala na operze.
Jak mozna to zrobic?

Moglby mi ktos sprawdzic jak to bedzie na IE?

Z gory dzieki
Pozdrawiam