Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> automatycznie dopasowana wysokosc diva
elem323
post
Post #1





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 24.07.2009

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


Witam, tak jak w temacie.. nie wiem czy znajdzie sie odwazny zeby sie z tym zmiezyc, bo problem raczej ciezki. Ponizej kod. dziala w IE6, FF3, nie dizla w IE7, IE8, Safari4


  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  3. "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
  5.  
  6. </head>
  7.  
  8. <div style="background:#99FF00; width:400px; overflow:hidden; height:100%; display:table">
  9.  
  10. <div style="float:left; width:200px; display:table; height:100%; background:#eaeaea;">
  11. This design uses a defined body height of 100% which allows setting the contained left and right divs at 100% height.
  12. </div>
  13. <div style="float:left; width:200px; display:table; overflow:hidden; background:#990000">
  14. contained left and right divs at 100% height. This design uses a defined body height of 100% which allows setting the
  15. contained left and right divs at 100% height. This design uses a defined body height of 100% which allows setting the
  16. contained left and right divs at 100% height. This design uses a defined body height of 100% which allows setting the
  17. contained left and right divs at 100% height. This design uses a defined body height of 100% which allows setting the
  18. </div>
  19.  
  20. </div>
  21.  
  22. </body>
  23. </html>
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Daiquiri
post
Post #2





Grupa: Administratorzy
Postów: 1 552
Pomógł: 211
Dołączył: 7.07.2009
Skąd: NJ




POD IE8 działa (nie wiem jak Safari i IE7) - nie mam możliwości sprawdzenia.

  1. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
  2. <style media="screen" type="text/css">
  3. /* <!-- */
  4. body {
  5. margin:0;
  6. padding:0;
  7. }
  8.  
  9.  
  10. #container2 {
  11. clear:left;
  12. float:left;
  13. width:100%;
  14. overflow:hidden;
  15. background:#990000;
  16. }
  17. #container1 {
  18. float:left;
  19. width:100%;
  20. position:relative;
  21. right:50%;
  22. background:#eaeaea;
  23. }
  24. #col1 {
  25. float:left;
  26. width:46%;
  27. position:relative;
  28. left:52%;
  29. overflow:hidden;
  30. }
  31. #col2 {
  32. float:left;
  33. width:46%;
  34. position:relative;
  35. left:56%;
  36. overflow:hidden;
  37. }
  38.  
  39. </style>
  40. </head>
  41.  
  42. <body>
  43.  
  44. <div id="container2">
  45. <div id="container1">
  46. <div id="col1">
  47.  
  48. This design uses a defined body height of 100% which allows setting the contained left and right divs at 100% height.
  49.  
  50. </div>
  51. <div id="col2">
  52.  
  53. contained left and right divs at 100% height. This design uses a defined body height of 100% which allows setting the
  54. contained left and right divs at 100% height. This design uses a defined body height of 100% which allows setting the
  55. contained left and right divs at 100% height. This design uses a defined body height of 100% which allows setting the
  56. contained left and right divs at 100% height. This design uses a defined body height of 100% which allows setting the
  57.  
  58. </div>
  59. </div>
  60. </div>
  61.  
  62.  
  63.  
  64.  
  65. </body>
  66. </html>


Polecam! (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

Ten post edytował Daiquiri 24.07.2009, 10:44:56
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 31.12.2025 - 21:03