Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [css] wyswietlanie divow
terabit
post 12.01.2008, 16:28:55
Post #1





Grupa: Zarejestrowani
Postów: 170
Pomógł: 4
Dołączył: 11.08.2006

Ostrzeżenie: (10%)
X----


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


--------------------
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
c0cr0ach
post 12.01.2008, 17:26:15
Post #2





Grupa: Zarejestrowani
Postów: 31
Pomógł: 1
Dołączył: 10.12.2006

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


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.


--------------------
this world means nothing
Go to the top of the page
+Quote Post
terabit
post 12.01.2008, 17:43:17
Post #3





Grupa: Zarejestrowani
Postów: 170
Pomógł: 4
Dołączył: 11.08.2006

Ostrzeżenie: (10%)
X----


@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

Ten post edytował terabit 12.01.2008, 17:44:22


--------------------
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 Wersja Lo-Fi Aktualny czas: 14.08.2025 - 07:10