Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> HTML - centrowanie tabeli
tes
post
Post #1





Grupa: Zarejestrowani
Postów: 72
Pomógł: 0
Dołączył: 23.06.2004
Skąd: Rzeszów

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


Mam taki formularz:

  1. <table cellspacing="1"><tr><td class="ramka">
  2. <table class="form" cellspacing="1">
  3. <form action="index.php" method="post">
  4. <tr><td class="form_tytul" colspan="2">Zaloguj się</td></tr>
  5. <tr><td class="form_input">Podaj swój login</td><td class="form_input"> <input type="text" class="input_log" name="login"></td></tr>
  6. <tr><td class="form_input">Podaj swoje hasło</td><td class="form_input"> <input type="password" class="input_log" name="password"></td></tr>
  7. <tr><td class="form_input" colspan="2"><input type="submit" class="input_przycisk" value="Ok" /></td></tr>
  8. </form>
  9. </td></tr></table>


Chcialbym sobie go wycentrowac na stronie, bez uzywania align="center", lub znacznika center. Wszedzie gdzie szukalem jest napsiane zeby w stylach w body {} wpisac:
Kod
text-align: center;


Ale mi to nic nie daje, probowalem tworzyc div i tak samo modyfikowac go w CSS i dalej bez skutku. Jest to na pewno banalny problem, ale jakos nie moge znalezc rozwiazania :/
Dziekuje za odpowiedzi.

Kurcze zly dzial (IMG:http://forum.php.pl/style_emoticons/default/sad.gif) Mozna prosic o przeniesienie tematu ?

Ten post edytował tes 28.06.2005, 18:10:02
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
strife
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 2 605
Pomógł: 96
Dołączył: 22.10.2004
Skąd: UK

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


Zobacz jeszcze margin: auto...

Czyli:
  1. <div style="width: 400px; margin: auto;">
  2. <table cellspacing="1"><tr><td class="ramka">
  3. <table class="form" cellspacing="1">
  4. <form action="index.php" method="post">
  5. <tr><td class="form_tytul" colspan="2">Zaloguj się</td></tr>
  6. <tr><td class="form_input">Podaj swój login</td><td class="form_input"> <input type="text" class="input_log" name="login"></td></tr>
  7. <tr><td class="form_input">Podaj swoje hasło</td><td class="form_input"> <input type="password" class="input_log" name="password"></td></tr>
  8. <tr><td class="form_input" colspan="2"><input type="submit" class="input_przycisk" value="Ok" /></td></tr>
  9. </form>
  10. </td></tr></table>
  11. </div>
Go to the top of the page
+Quote Post
NuLL
post
Post #3





Grupa: Zarejestrowani
Postów: 2 262
Pomógł: 21
Dołączył: 3.05.2004
Skąd: Sopot, Krakow, W-wa

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


Zamykam.

Przenoszę aby nie było śmietnika tam gdzie być powinno.

php Początkujący (!) - Po stronie przeglądarki.

@tes: 43 posty i temat na złym forum :?:

Nagradzam ostrzeżeniem abyś pamiętał gdzie mają być tematy.
Go to the top of the page
+Quote Post

Closed TopicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 24.08.2025 - 17:22