Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [CSS][HTML] Input image i padding/margin
colachips
post
Post #1





Grupa: Zarejestrowani
Postów: 49
Pomógł: 0
Dołączył: 12.01.2009

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


Witajcie,

Mam taki oto krótki i prosty kod:

  1. <div class="search">
  2. <form accept-charset="utf-8" method="post" action="/businessinsurance/"> Szukaj <input type="text" class="search_input" name="search"> <input type="image" class="search_btn" src="/businessinsurance/media/images/search/search_btn.png"> </form> </div>


I taki CSS:

  1. #header .search {
  2. padding-top: 32px;
  3. display: block;
  4. float: right;
  5. }
  6.  
  7. #header .search_input {
  8. border: 1px solid #bbb;
  9. }
  10.  
  11. #header .search_btn {
  12. margin-top: 2px; /* przesuwa cały div */
  13. }


Muszę jednak nieco przesunąć obrazek submita ".search_btn". Niestety czy to padding-top czy margin-top zostaje przesunięty cały div ".search".

Kombinowałem żeby .search_btn miał atrybut float: right - prawie dobrze, ale w IE się wtedy wszystko sypie :/

Będę wdzięczny za pomoc (IMG:style_emoticons/default/smile.gif)

Pozdrawiam!

Ten post edytował colachips 6.06.2011, 08:53:01
Go to the top of the page
+Quote Post
gigzorr
post
Post #2





Grupa: Zarejestrowani
Postów: 652
Pomógł: 47
Dołączył: 6.02.2010
Skąd: Radom

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


O taki efekt ci chodzilo?
  1. <style type="text/css">
  2. #header .search {
  3. padding-top: 32px;
  4. display: block;
  5. float: right;
  6. }
  7.  
  8. #header .search_input {
  9. border: 1px solid #bbb;
  10.  
  11. }
  12.  
  13. #header .search_btn {
  14. margin-top: 22px; /* przesuwa cały div */
  15.  
  16. }
  17.  
  18. .search_btn {margin-left: 30px; margin-top:50px; } // tutaj zmień marginesy.
  19. </style>
  20.  
  21. <div class="search" >
  22. <form accept-charset="utf-8" method="post" action="/businessinsurance/"> <span style="float:left;">Szukaj</span> <input type="text" style="float:left;" class="search_input" name="search"> <input type="image" style="float:left;" class="search_btn" src="/businessinsurance/media/images/search/search_btn.png"> </form> </div>


Ten post edytował gigzorr 6.06.2011, 13:22:26
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: 22.08.2025 - 14:49