Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Zmiana rozmiaru div-a - problem
dag1980
post 27.01.2010, 11:43:35
Post #1





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 21.07.2009

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


Nie mam pojęcia jak zrobić aby po najechaniu na diva powiększał on się ale równomiernie na prawo i lewo a nie jak do tej pory na prawo.
Ktoś może pomóc.

Korzystam z biblioteki mootols

Strona

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <script type="text/javascript" src="mootools.js"></script>
  6. <script type="text/javascript" src="mootools-2.js"></script>
  7. <link rel="stylesheet" type="text/css" href="style-2.css" />
  8.  
  9.  
  10. </head>
  11. <ul id="menu">
  12. <li><div class="el" >asa</div></li>
  13. <li><div class="el">asa</div></li>
  14. <li><div class="el">asa</div></li>
  15. <li><div class="el">asa</div></li>
  16.  
  17. </ul>
  18.  
  19.  
  20.  
  21. </body>
  22. </html>



style.css

  1. div#content{
  2. padding-bottom: 100px;
  3. }
  4.  
  5. ul#menu{
  6. list-style-type: none;
  7. }
  8.  
  9. ul#menu li{
  10. padding: 5px;
  11. text-align: center;
  12. display: block;
  13. float: left;
  14. width: 128px;
  15. height: 128px;
  16. }
  17.  
  18. ul#menu li img{
  19. width: 48px;
  20. height: 48px;
  21. border: 0px;
  22. }
  23.  
  24. ul#menu li a{
  25. color: #000;
  26. font-weight: bold;
  27. font-size: 24px;
  28. font-family: "Trebuchet MS";
  29. text-decoration: none;
  30. }
  31.  
  32. div.el {
  33. width:48px; height: 48px;
  34. background-color:#00FF66;
  35. }


Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
skowron-line
post 27.01.2010, 16:45:04
Post #2





Grupa: Zarejestrowani
Postów: 4 340
Pomógł: 542
Dołączył: 15.01.2006
Skąd: Olsztyn/Warszawa

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


Sprawdź sobie taki kod.
  1. <div id="a" style="width:100;height:100;background-color:pink;margin-left:300px; margin-top:200"></div>

[JAVASCRIPT] pobierz, plaintext
  1. window.addEvent( 'domready', function(){
  2. var m = new Fx.Morph( $('a'), {duration: 'long'});
  3. m.start({
  4. 'width': [100, 400],
  5. 'height':[100, 500],
  6. 'margin-left': [ $('a').getStyle( 'margin-left'), 200 ],
  7. 'margin-top': [ $('a').getStyle('margin-left'), 200 ]
  8. });
  9. })
[JAVASCRIPT] pobierz, plaintext

Dokładnie to co napisał kolega wyżej ale w przełożeniu na mootools -a


--------------------
I'm so fast that last night I turned off the light switch in my hotel room and was in bed before the room was dark - Muhammad Ali.
Peg jeżeli chcesz uprawiać sex to dzieci muszą wyjść, a jeżeli chcesz żeby był dobry ty też musisz wyjść - Al Bundy.

QueryBuilder, Mootools.net, bbcradio1::MistaJam
http://www.phpbench.com/
Go to the top of the page
+Quote Post

Posty w temacie


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: 14.08.2025 - 15:28