Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Łączenie selektorów, Selektor atrybutu i dalej...
#luq
post
Post #1





Grupa: Zarejestrowani
Postów: 589
Pomógł: 91
Dołączył: 22.05.2008
Skąd: Gliwice

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


  1. <div id="slots">
  2. <div class="column" rel="1">
  3. <div class="top"></div>
  4. <div class="bottom"></div>
  5. <div class="shadow"></div>
  6. </div>
  7. <div class="column" rel="2">
  8. <div class="top"></div>
  9. <div class="bottom"></div>
  10. <div class="shadow"></div>
  11. </div>
  12. <div class="column" rel="3">
  13. <div class="top"></div>
  14. <div class="bottom"></div>
  15. <div class="shadow"></div>
  16. </div>
  17. </div>


i mam do tego:

  1. #slots div.column[rel="1"] div.top { /**/ }


Lecz nie działa. Chodź w Firebug`u ten styl istnieje i nie jest przekreślony...
Ogólnie chodzi o dostęp do div.top i div.bottom z div.column który posiada rel="X"

Reszta stylu dt. tego kontenera:
  1. #slots { position: absolute; top: 295px; left: 80px; width: 536px; height: 294px; background-color: red; z-index: 400; }
  2. #slots div.column { width: 178px; height: 294px; float: left; }
  3.  
  4. #slots div.column div.shadow { position: absolute; top: 147px; width: 178px; height: 147px; background: url(../img/bg_slot.png); }
  5.  
  6. #slots div.column[rel="1"] div.top { background-color: lime; }
  7. #slots div[rel="2"] { border-left: 1px solid #fff; border-right: 1px solid #fff; }


EDIT
Okej, problem rozwiązany nie miałem ustawionych wielkości...
Wystarczyło:
  1. #slots div.column div.top, #slots div.column div.bottom { width: 178px; height: 147px; }


Ten post edytował #luq 18.09.2010, 15:35:05
Go to the top of the page
+Quote Post
kamil4u
post
Post #2





Grupa: Zarejestrowani
Postów: 2 350
Pomógł: 512
Dołączył: 4.01.2009
Skąd: Wrocław / Świdnica

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


U mnie wszystko działa: Ubuntu Firfox 3.6.8 . Musisz tylko dodać jakiś tekst czy coś, bo inaczej div jest pusty:
Kod
<div class="top">test</div>
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: 20.12.2025 - 15:03