Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP][CSS] płynny szablon z minimalna wysokoscia
lnn
post
Post #1





Grupa: Zarejestrowani
Postów: 361
Pomógł: 11
Dołączył: 17.12.2008
Skąd: LU

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


Czy da rade ustalic minimalna wysokosc np main zeby szablon byl nadal plynny??
Mozna wziac
overflow: auto; ale wtedy scroll sie robi :/ jakies pomysly?

  1. #box {
  2. position:relative;
  3. margin: 4px auto;
  4. width: 870px;
  5. }
  6. #header {
  7. height: 120px;
  8. padding-left:10px;
  9. padding-top:10px;
  10. padding-right:10px;
  11. background-image:url(img/top.png);
  12. }
  13.  
  14. #menu {
  15. width: 160px;
  16. float: left;
  17. overflow: hidden;
  18. position: relative;
  19. background-color: #085C38;
  20. background-image:url(img/menu.png);
  21. background-repeat: repeat-y;
  22. padding-left:10px;
  23. padding-top:10px;
  24. padding-right:10px;
  25. padding-bottom:40px;
  26. }
  27.  
  28. #main {
  29. width:660px;
  30. float:left;
  31. background-color: #D5FFD5;
  32. padding-right:10px;
  33. padding-left:20px;
  34. padding-top:10px;
  35. padding-bottom:10px;
  36. }
  37.  
  38. #footer {
  39. height:37px;
  40. clear: both;
  41. background-image:url('img/foot.png');
  42. background-repeat: repeat-x;
  43. padding-left:5px;
  44. padding-top:5px;
  45. font-size:10px;
  46. text-align:center;
  47. color: silver;
  48. }


Ten post edytował lnn 28.01.2010, 23:21:48
Go to the top of the page
+Quote Post
emtiej
post
Post #2





Grupa: Zarejestrowani
Postów: 207
Pomógł: 18
Dołączył: 12.04.2009
Skąd: Rypin

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


min-height: ...px;

Nie wiem czy wszystkie przeglądarki to obsługują, poszukaj tu pisze że większość tak: http://www.w3schools.com/CSS/pr_dim_min-height.asp
Go to the top of the page
+Quote Post
lnn
post
Post #3





Grupa: Zarejestrowani
Postów: 361
Pomógł: 11
Dołączył: 17.12.2008
Skąd: LU

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


hmm dzieki niby dziala tongue.gif ciekawe w ilu przegladarkach smile.gif
ale wazne zeby w najpopulerniejszych winksmiley.jpg
Go to the top of the page
+Quote Post
Szeszek1992
post
Post #4





Grupa: Zarejestrowani
Postów: 117
Pomógł: 29
Dołączył: 20.05.2009

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


  1. function heightAlign(minHeight) {
  2. var elm = [], val = [minHeight], i, tmp;
  3. for (i = 1; i < arguments.length; i++) {
  4. if (tmp = document.getElementById(arguments[i])) {
  5. elm[elm.length] = tmp;
  6. tmp.style.height = 'auto';
  7. val[val.length] = tmp.offsetHeight;
  8. }
  9. }
  10. tmp = eval('Math.max(' + val.join(',') + ')');
  11. for (i = 0; i < elm.length; i++) {
  12. elm[i].style.height = tmp + 'px';
  13. }
  14. }
  15. onload = function() {
  16. heightAlign(0, 'left', 'right');
  17. };

Nie wiem, czy akurat o to Ci chodziło, ale znalazłem kiedyś takie coś w internecie. W funkcji heightAlign(0, 'left', 'right') zamiast left i right dajesz identyfikatory divów, które mają zostać wyrównane(krótszy uzyskuje taką samą długość jak dłuższy). Być może się przyda.

PS. Działa we wszystkich przeglądarkach, które testowałem(IE>5.5, FF, Opera, Chrome, Safari itp.)

Ten post edytował Szeszek1992 29.01.2010, 00:02:03


--------------------
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 Aktualny czas: 20.08.2025 - 15:10