Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [css] wyswietlanie divow
Forum PHP.pl > Forum > Przedszkole
terabit
Witam,

mam np. coś takiego
  1. #srodek {
  2. height: auto;
  3. width: 100%;
  4. text-align: left;
  5. }
  6.  
  7. #menu_left {
  8. height: auto;
  9. width: 180px;
  10. text-align: left;
  11. float:left;
  12. }
  13.  
  14. #tekst {
  15. height: auto;
  16. width: 100%;
  17. text-align: left;
  18. float:left;
  19. }


i chciałbym aby div tekst miał zawsze 100% - 180px
czyli zajmował całą pozostałą/dostępną szerokość

nie wiem ja to zrobić...
może ktoś pomoże ? winksmiley.jpg
c0cr0ach
Podaj szerokość menu po lewej stronie i diva z tekstem w procentach, np.:

  1. #srodek {
  2. height: auto;
  3. width: 100%;
  4. text-align: left;
  5. }
  6.  
  7. #menu_left {
  8. height: auto;
  9. width: 20%;
  10. text-align: left;
  11. float:left;
  12. }
  13.  
  14. #tekst {
  15. height: auto;
  16. width: 80%;
  17. text-align: left;
  18. float:left;
  19. }


Rozumiem, że div srodek pełni rolę wrappera. W takim wypadku umieszczasz w nim dwa pozostałe i powinno być w porządku.
terabit
@c0cr0ach - nie, tak nie może być,
ale już sobie poradziłem, znalazłem coś takiego:

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <title>Layout 31</title>
  3. <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
  4. <meta name="generator" content="HAPedit 3.1">
  5. <style type="text/css">
  6. html,body{margin:0;padding:0}
  7. body{font: 100% arial,sans-serif}
  8.  
  9. div#navigation{background:red}
  10.  
  11. div#wrapper{
  12. float:left;
  13. width:100%;
  14. }
  15.  
  16. div#content{
  17. margin-left:200px;
  18. background: green;
  19. }
  20.  
  21. div#navigation{
  22. float:left;
  23. width:200px;
  24. margin-left:-100%;
  25. }
  26.  
  27. </head>
  28.  
  29. <div id="wrapper">
  30. <div id="content">
  31. d1) Content here. column long long column very long fill fill fill long text text column text silly very make long very fill silly make make long make text fill very long text column silly silly very column long very column filler fill long make filler long silly very long silly silly silly long filler make column filler make silly long long fill very.
  32. <br>very make make fill silly long long filler column long make silly silly column filler fill fill very filler text fill filler column make fill make text very make make very fill fill long make very filler column very long very filler silly very make filler silly make make column column
  33. </div>
  34. </div>
  35.  
  36. <div id="navigation">
  37. 4444) Navigation here. long long fill filler very fill column column silly filler very filler fill fill filler text fill very silly fill text filler silly silly filler fill very make fill column text column very very column fill fill very silly column silly silly fill fill long filler
  38. </div>
  39.  
  40. </body>
  41. </html>


może się komuś przyda winksmiley.jpg

Dzięki,
pozdrawiam
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.