Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [CSS][HTML] Rozszerzalność div'a w stosunku do okna przeglądarki
Fsh
post
Post #1





Grupa: Zarejestrowani
Postów: 31
Pomógł: 0
Dołączył: 6.05.2007

Ostrzeżenie: (40%)
XX---


Witam serdecznie,

Mam problem związany z rozszerzalnością środkowego diva #content zawartego w poniższym kodzie.
Chciałbym żeby div #content zmieniał szerokość w zależności od okna przeglądarki, przy czym minimalna jego wartość ma wynosić 580px zaś maksymalna 860px. Wartości height w css podane dla przykładu.
Bardzo proszę o pomoc.

LINK: SZABLON

HTML:
  1. <div id="container">
  2. <div id="top"></div>
  3. <div id="menu"></div>
  4. <div id="main">
  5. <div id="left"></div>
  6. <div id="content"></div>
  7. <div id="right"></div>
  8. </div>
  9. </div>
  10. <div id="footer"></div>


CSS:
  1. body {
  2. margin: 0px auto;
  3. width: 100%;
  4. }
  5.  
  6. #container {
  7. margin: 0px auto;
  8. min-width: 1000px;
  9. max-width: 1280px;
  10. }
  11.  
  12. #top {
  13. background: #000;
  14. height: 50px;
  15.  
  16. margin: 0px 0px 20px 0px;
  17. width: 100%;
  18. }
  19.  
  20. #menu {
  21. background: #000;
  22. height: 50px;
  23.  
  24. clear: both;
  25. width: 100%;
  26. margin: 0px 0px 20px 0px;
  27. }
  28.  
  29. #left {
  30. background: #000;
  31. height: 50px;
  32.  
  33. float: left;
  34. width: 200px;
  35. margin: 0px 0px 20px 0px;
  36. }
  37.  
  38. #main {
  39. clear: both;
  40. width: 100%;
  41. }
  42.  
  43. #content {
  44. background: #000;
  45. height: 50px;
  46. min-width: 580px;
  47. padding: 0px;
  48. width: auto;
  49.  
  50. float: left;
  51. display: inline;
  52. margin: 0px 10px 20px 10px;
  53. }
  54.  
  55. #right {
  56. background: #000;
  57. height: 50px;
  58.  
  59. float: right;
  60. display: inline;
  61. width: 200px;
  62. margin: 0px 0px 20px 0px;
  63. }
  64.  
  65. #footer {
  66. height: 50px;
  67. background: #000 repeat-x;
  68.  
  69. clear: both;
  70. }
  71.  


Ten post edytował Fsh 3.04.2011, 11:08:31
Go to the top of the page
+Quote Post
albercik1983
post
Post #2





Grupa: Zarejestrowani
Postów: 37
Pomógł: 0
Dołączył: 28.02.2009

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


A próbowałeś zamiast "min-width: 1000px; max-width: 1280px;" dać "width: 100%;" ?
Go to the top of the page
+Quote Post
Fsh
post
Post #3





Grupa: Zarejestrowani
Postów: 31
Pomógł: 0
Dołączył: 6.05.2007

Ostrzeżenie: (40%)
XX---


Niestety to nie pomaga
Go to the top of the page
+Quote Post
webfreak
post
Post #4





Grupa: Zarejestrowani
Postów: 77
Pomógł: 8
Dołączył: 29.03.2011
Skąd: Londyn

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


Coś nie przyjazne te wymiary... Rozumiem że chcesz osiągnąc inny rozmiar na innej rozdzielczości.... Zobacz może to pomoże
Go to the top of the page
+Quote Post

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: 2.10.2025 - 02:56