Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [CSS] Div - problem i prośba o wyjaśnienie
Koniczynka
post 23.02.2007, 12:27:07
Post #1





Grupa: Zarejestrowani
Postów: 61
Pomógł: 0
Dołączył: 24.05.2006

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


Witam,

Mam problem z divem, a konkretniej jego położeniem. Nie mogę za nic pojąć, dlaczego automatycznie zjeżdża on w dół, kiedy powinien być obok.
Kod strony:
  1. <div id="bok"></div>
  2. <div id="menu1">
  3. <div class="m1"></div><div class="m1a"></div></div>
  4.  
  5. <div id="menu2">
  6. <div class="m2"></div><div class="m2a"></div></div>
  7.  
  8. <div id="menu3">
  9. <div class="m3"></div><div class="m3a"></div></div>
  10.  
  11. <div id="menu4">
  12. <div class="m4"></div><div class="m4a"></div></div>
  13.  
  14. <div id="menu5">
  15. <div class="m5"></div><div class="m5a"></div></div>
  16.  
  17. <div id="menu6">
  18. <div class="m6"></div><div class="m6a"></div></div>
  19.  
  20. <div id="menu7">
  21. <div class="m7"></div><div class="ma7"></div><div class="m7a"></div></div>
  22.  
  23.  
  24. <div id="menu8"><div class="m8a"></div></div>
  25.  
  26. <div id="menu10">
  27. <div class="m10"></div><div class="m10a"></div></div>


CSS:
Cytat
#bok {background:url(images/design_01.gif) no-repeat; width:178px; height:457px; float:left;}
#bok2 {background:url(images/design_20.gif) no-repeat; width:180px; height:278px; float:left;}

#menu1 {width:21px; height:179px; float:left;}
.m1 {background:url(images/design_02.gif) no-repeat; width:21px; height:102px; }
.m1a {background:url(images/design_13.gif) no-repeat; width:21px; height:77px; }

#menu2 {width:21px; height:179px; float:left; }
.m2 {background:url(images/design_03.gif) no-repeat; width:21px; height:109px; }
.m2a {background:url(images/design_14.gif) no-repeat; width:21px; height:70px; }

#menu3 {width:20px; height:177px; float:left; }
.m3 {background:url(images/design_04.gif) no-repeat; width:20px; height:122px; }
.m3a {background:url(images/design_15.gif) no-repeat; width:20px; height:57px; }

#menu4 {width:20px; height:181px; float:left; }
.m4 {background:url(images/design_05.gif) no-repeat; width:20px; height:131px; }
.m4a {background:url(images/design_16.gif) no-repeat; width:20px; height:48px; }

#menu5 {width:19px; height:179px; float:left; }
.m5 {background:url(images/design_06.gif) no-repeat; width:19px; height:141px; }
.m5a {background:url(images/design_17.gif) no-repeat; width:19px; height:38px; }

#menu6 {width:4px; height:179px; float:left;}
.m6 {background:url(images/design_07.gif) no-repeat; width:4px; height:151px; }
.m6a {background:url(images/design_18.gif) no-repeat; width:4px; height:28px; }

#menu7 {width:28px; height:179px; float:left; }
.m7 {background:url(images/design_08.gif) no-repeat; width:16px; height:151px; float:left;}
.ma7 {background:url(images/design_09.gif) no-repeat; width:12px; height:151px; float:left; }
.m7a {background:url(images/design_19.gif) no-repeat; width:28px; height:28px; }

#menu8 {width:376px; height:179px; float:left; }
.m8a {background:url(images/design_10.gif) no-repeat; width:376px; height:179px; }

#menu10 {width:337px; height:179px; float:left;}
.m10 {background:url(images/design_11.gif) no-repeat; width:337px; height:31px; }
.m10a {background:url(images/design_12.gif) no-repeat; width:337px; height:148px; }



Kiedy usuwam dajmy na to diva o id menu8 i zostawiam menu10, to div o menu10 jest obok diva o id menu7. Dlaczego dzieje się tak, że ten ostatni div zjeżdża ? Próbowałem ustawić jednego wielkiego diva o width zsumowanym ze wszystkich, ale było to samo... Z góry dziękuję za pomoc.


======Edit: Jakby ktoś popełnił tak samo głupi błąd jak ja... Ustawcie w takiej sytuacji rozmiar body, czego ja nie zrobiłem. Problem zażegnany. Myślę, że temat przyda się jakoś początkującym z podobnymi problemami.

Ten post edytował Koniczynka 13.01.2008, 15:46:41
Go to the top of the page
+Quote Post
.radex
post 9.04.2007, 17:15:29
Post #2





Grupa: Zarejestrowani
Postów: 1 657
Pomógł: 125
Dołączył: 29.04.2006

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


atrybut css:

clear: both;


--------------------
blog | Tadam — minutnik do Pomodoro na Maka :)
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: 15.06.2025 - 06:56