Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][CSS] Problem z wypozycjonowaniem elementów na stronie
nighttrain
post
Post #1





Grupa: Zarejestrowani
Postów: 79
Pomógł: 0
Dołączył: 2.06.2010

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


Witam

Mam mały problemik, otóż chciałbym, aby inputy oraz submity znalazły się na obrazku, wychodzi mi tak, że obrazek jest na środku, a inputy i submit układa się po lewej stronie...
Czy mógłby ktoś zobaczyć i pomóc?
Oto zdjęcie jak to wygląda:


oto kawałek kodu z index php:
  1. <div id="login_form">
  2. <h1>Login</h1>
  3. <?php
  4. function ShowLogin($komunikat=""){
  5. echo "$komunikat<br>";
  6. echo "<form action='index.php' method=post>";
  7. echo "<input type=text name=login><br>";
  8. echo "<input type=password name=haslo><br>";
  9. echo "<input type=submit value='Zaloguj!'>";
  10. echo "</form>";
  11. echo "Jeśli nie jesteś zarejestrowany, <a href='rejestruj.php'>tu znajdziesz formularz</a>";
  12. }
  13. ?>
  14. </div>


a to plik .css:
  1. body {
  2. background-color: #f0f0f0;
  3. margin: 0;
  4. padding: 0;
  5. font-family: arial;
  6. }
  7.  
  8. #login_form {
  9. width:300px;
  10. height: 200px;
  11. background: #f0f0f0 url(graphics/login_bg.jpg) repeat-x;
  12. border: 1px solid white;
  13. margin: 250px auto 0;
  14. padding: 1em;
  15. -moz-border-radius: 3px;
  16. -webkit-border-radius: 3px;
  17. padding: 7px 5px 0 5px;
  18. }
  19.  
  20. h1,h2,h3,h4,h5 {
  21. margin-top: 0;
  22. font-family: sans-serif;
  23. text-align: center;
  24. }
  25.  
  26. input[type=text], input[type=password] {
  27. display:block;
  28. margin: 0 0 1em 0;
  29. width: 280px;
  30. border: 5px;
  31. -moz-border-radius: 1px;
  32. -webkit-border-radius: 1px;
  33. padding: 1em;
  34. }
  35.  
  36. input[type=submit], forma a {
  37. border: none;
  38. margin-right: 1em;
  39. padding: 6px;
  40. border: 5px;
  41. text-decoration: none;
  42. font-size: 20px;
  43. -moz-border-radius: 4px;
  44. -webkit-border-radius: 4px;
  45. background: #348075;
  46. color: white;
  47. box-shadow: 0 1px 0 white;
  48. -moz-box-shadow: 0 1px 0 white;
  49. -webkit-box-shadow: 0 1px 0 white;
  50. }
  51.  
  52. /* podświetlenie przycisku po najechaniu na niego */
  53. input[type=submit]:hover {
  54. background: #287368;
  55. cursor: pointer;
  56. }


Szczerze to kodzik css skopiowałem z jakieś stronki...
Go to the top of the page
+Quote Post

Posty w temacie


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: 21.08.2025 - 20:52