Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [CSS]css problem
-css problem-
post
Post #1





Goście







Witam!

  1. <div class="lb_block">
  2.  
  3. <div class="lb_labelholder">
  4. <label for="description">Meta Description</label> </div>
  5.  
  6. <div class="lb_inputholder">
  7. <textarea title="Opis meta dla ogłoszenia" name='metadesc' id='metadesc' class="gbTip " ></textarea>
  8. </div>



Chcę ukryć cały block lb_block, nie mogę bezpośrednio na niego dać display:none, bo jest parę innch lb_block które muszą zostać.

Lecz takie coś nie działa:

  1. .lb_block > textarea[name=metadesc] {
  2. display: none;
  3. }


Ktoś ma jakiś pomysł?
Go to the top of the page
+Quote Post
-css problem-
post
Post #2





Goście







Przepraszam
Kod jest taki:

  1. <div class="lb_block">
  2.  
  3. <div class="lb_labelholder">
  4. <label for="description">Meta Description</label> </div>
  5.  
  6. <div class="lb_inputholder">
  7. <textarea title="Opis meta dla ogłoszenia" name='metadesc' id='metadesc' class="gbTip " ></textarea>
  8. </div>
  9.  
  10. <div class="clear"></div>
  11. </div>
  12. </div>
Go to the top of the page
+Quote Post
viking
post
Post #3





Grupa: Zarejestrowani
Postów: 6 380
Pomógł: 1116
Dołączył: 30.08.2006

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


Możliwości jest kilka, choćby nth-child.


--------------------
Go to the top of the page
+Quote Post
-Gość-
post
Post #4





Goście







Zliczanie dzieci odpada, może ktoś mnie uświadomić dlaczego nei działa moja metoda?
Go to the top of the page
+Quote Post
b4x
post
Post #5





Grupa: Zarejestrowani
Postów: 658
Pomógł: 95
Dołączył: 20.12.2005
Skąd: N54,35° E18,63° (Gdańsk)

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


Najlepiej chyba będzie zastosować cssParentSelector ( http://demo.idered.pl/jQuery.cssParentSelector/ )

Przykładowe użycie (do tego co napisałeś)
  1. <head>
  2. <style type="text/css">
  3. div.lb_block! > textarea[name="metadesc"] { display: none }
  4. </style>
  5. </head>
  6. <body>
  7. <div class="lb_block">
  8. <div class="lb_labelholder">
  9. <label for="description">Meta Description</label> </div>
  10. <div class="lb_inputholder">
  11. <textarea title="Opis meta dla ogłoszenia" name='metadesc' id='metadesc' class="gbTip " ></textarea>
  12. </div>
  13.  
  14. <div class="clear"></div>
  15. </div>
  16. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  17. <script src="https://raw.github.com/Idered/cssParentSelector/master/jQuery.cssParentSelector.js"></script>
  18. </body>
  19. </html>


Ten post edytował b4x 21.04.2013, 16:28:53


--------------------
Go to the top of the page
+Quote Post
Rysh
post
Post #6





Grupa: Zarejestrowani
Postów: 821
Pomógł: 111
Dołączył: 11.09.2006
Skąd: Biała Podlaska

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


A nie możesz dać:
  1. <div class="lb_inputholder" id="hidden">

?


--------------------
Go to the top of the page
+Quote Post
Helid
post
Post #7





Grupa: Zarejestrowani
Postów: 280
Pomógł: 20
Dołączył: 12.12.2007
Skąd: 127.0.0.1

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


Zamiast
Kod
.lb_block > textarea[name=metadesc] {
    display: none;
}


powinno być

Kod
.lb_block .lb_inputholder > textarea[name=metadesc] {
    display: none;
}


--------------------
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 Aktualny czas: 20.08.2025 - 11:45