Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML][CSS]Obrazek zasłaniający input
Sebastian003
post 1.02.2014, 11:26:49
Post #1





Grupa: Zarejestrowani
Postów: 282
Pomógł: 2
Dołączył: 22.03.2007

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


Witam, mam input i obrazek chciałbym aby ten obrazek zasłaniał częściowo input jak to wykonać naniesienie kodu position: absolute; i regulacja marginem nic nie daje obrazek jest pod inputem.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 5)
Mega_88
post 1.02.2014, 11:41:10
Post #2





Grupa: Zarejestrowani
Postów: 360
Pomógł: 34
Dołączył: 20.08.2011

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


Wrzuć wszystko w jednego diva z position:relative, daj inputa pod nip obrazem z position:absolute;top:20px;left:0 coś w ten deseń
Go to the top of the page
+Quote Post
Sebastian003
post 1.02.2014, 11:47:12
Post #3





Grupa: Zarejestrowani
Postów: 282
Pomógł: 2
Dołączył: 22.03.2007

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


dam przykład kodu bo mi nie wychodzi

Kod
<input id="name" class="mainform" type="text" value="" name="name" />
<div id="krowa"></div>

css

Kod
#krowa{  background-image: url("images/krowa.png");
    height: 181px;
  margin-left: 846px;
    margin-top: 93px;
    position: absolute;
    width: 227px;}
Go to the top of the page
+Quote Post
-Gość-
post 1.02.2014, 11:57:26
Post #4





Goście







http://jsfiddle.net/GmdSW/
Go to the top of the page
+Quote Post
kreatiff
post 1.02.2014, 17:13:19
Post #5





Grupa: Zarejestrowani
Postów: 324
Pomógł: 105
Dołączył: 7.08.2012

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


A z-index próbowałeś?
Go to the top of the page
+Quote Post
tomxx
post 1.02.2014, 20:26:16
Post #6





Grupa: Zarejestrowani
Postów: 172
Pomógł: 27
Dołączył: 5.10.2013

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


Przykładowo:
  1. #krowa{ background-image: url("http://img.90minut.pl/img/tlo.gif?d=2013-03-26");
  2. height: 181px;
  3. margin-left: 846px;
  4. margin-top: 93px;
  5. position: absolute;
  6. width: 227px;}
  7. input#name {
  8. position: absolute;
  9. margin-left: 830px;
  10. margin-top: 80px;
  11. }
  12. </head>
  13. <input id="name" class="mainform" type="text" value="" name="name" />
  14. <div id="krowa"></div>
  15. </body>
  16. </html>
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: 14.08.2025 - 03:38