Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML][CSS] Wyśrodkowywanie linków w menu
Webmasterr
post
Post #1





Grupa: Zarejestrowani
Postów: 71
Pomógł: 5
Dołączył: 7.08.2010

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


Witam!

Moje linki w menu są przesunięte trochę w prawo:



Co źle zrobiłem?

Menu:

  1. <!-- Menu -->
  2.  
  3. <div id="menu_tabela">
  4.  
  5. <ul class="menu">
  6.  
  7. <div class="nawigacja_div">
  8. <li><a href="index.php" class="nawigacja">Strona Główna</a></li>
  9. </div>
  10.  
  11. &nbsp;
  12.  
  13. <div class="nawigacja_div">
  14. <li><a href="wyborprezentu.php" class="nawigacja">Wysyłanie prezentu</a></li>
  15. </div>
  16.  
  17. &nbsp;
  18.  
  19. <div class="nawigacja_div">
  20. <li><a href="szukanieprezentu.php" class="nawigacja">Szukaj prezentu</a></li>
  21. </div>
  22.  
  23. &nbsp;
  24.  
  25. <div class="nawigacja_div">
  26. <li><a href="kontakt.php" class="nawigacja">Kontakt z Nami</a></li>
  27. </div>
  28.  
  29. </ul>
  30.  
  31. </div>
  32.  
  33. <!-- Koniec Menu -->




  1. /* Menu */
  2.  
  3. div#menu_tabela {
  4.  
  5. background-image: url('tlo_menu.png');
  6.  
  7. height: 5%;
  8. width: 75%;
  9.  
  10. margin: auto;
  11.  
  12. border: 5px ridge;
  13. border-color: #99BF33;
  14. }
  15.  
  16.  
  17.  
  18. ul.menu li
  19. {
  20. font-size: 100%;
  21. font-weight: bold;
  22.  
  23. color: blue;
  24.  
  25. display: inline-block;
  26.  
  27. text-decoration: none;
  28. }
  29.  
  30.  
  31.  
  32. a.nawigacja
  33. {
  34. text-decoration: none;
  35. }
  36.  
  37.  
  38.  
  39. div.nawigacja_div
  40. {
  41. display: inline-block;
  42. }
  43.  
  44. /* Koniec Menu */


I jeszcze CSS nadrzędnych elementów:

  1.  
  2. body
  3. {
  4. background-image: url(tlo.png);
  5. background-attachment: fixed;
  6. background-repeat: repeat-x;
  7.  
  8. height: 100%;
  9. width: 100%;
  10.  
  11. text-align: center;
  12.  
  13. overflow-x: hidden;
  14. }
  15.  
  16. div.strona
  17. {
  18. background-color: #F1F6B9;
  19.  
  20. border: 5px ridge;
  21. border-color: #000000;
  22.  
  23. margin: auto;
  24.  
  25. width: 60%;
  26. height: 100%;
  27. }
  28.  



--------------------

Darmowe e-booki (kliknij tutaj)
------------------------------------------------------------
Zapunktuj (kliknij tutaj) <--- Zarejestruj się i zobacz!
Darmowe doładowania telefonu, Eurogąbki itp.
------------------------------------------------------------
PHP 5, CSS 2.1, xHTML 1.1, JavaScript 1.7
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 3)
kokers
post
Post #2





Grupa: Zarejestrowani
Postów: 154
Pomógł: 33
Dołączył: 18.10.2010
Skąd: Katowice

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


po 1. obrazek się nie wyświetla.
po 2. pokaż jak to wygląda online.


--------------------
‎"Sometimes you're gonna get odd error syntax, unexpected T_PAAMAYIM_NEKUDOTAYIM and you're like, what in the world is that thing i have no idea what went wrong in my code. In english that error means you screwed up the references to an object" Kevin Skoglund
Drobna prywata: Ależ nie nie, nie zamierzam zmieniać płci w najbliższym czasie, więc zwracanie się do mnie per Pan jest odrobinkę nietrafione.
Go to the top of the page
+Quote Post
Webmasterr
post
Post #3





Grupa: Zarejestrowani
Postów: 71
Pomógł: 5
Dołączył: 7.08.2010

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


[Usunałęm link aby nie zostać zbanowanym]

ale tylko na str. głównej się wyświetla menu bo tylko tam jest wstawione smile.gif

No i jeszcze na 'Szukanie Prezentu'.

Ten post edytował Webmasterr 19.10.2010, 20:45:14


--------------------

Darmowe e-booki (kliknij tutaj)
------------------------------------------------------------
Zapunktuj (kliknij tutaj) <--- Zarejestruj się i zobacz!
Darmowe doładowania telefonu, Eurogąbki itp.
------------------------------------------------------------
PHP 5, CSS 2.1, xHTML 1.1, JavaScript 1.7
Go to the top of the page
+Quote Post
kokers
post
Post #4





Grupa: Zarejestrowani
Postów: 154
Pomógł: 33
Dołączył: 18.10.2010
Skąd: Katowice

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


nie wiem skąd

  1. <ul class="menu">


bierze ten padding, ale dodaj do CSS

  1. .menu{
  2. padding:0px;
  3. }


i będzie wyświetlało się na środku


--------------------
‎"Sometimes you're gonna get odd error syntax, unexpected T_PAAMAYIM_NEKUDOTAYIM and you're like, what in the world is that thing i have no idea what went wrong in my code. In english that error means you screwed up the references to an object" Kevin Skoglund
Drobna prywata: Ależ nie nie, nie zamierzam zmieniać płci w najbliższym czasie, więc zwracanie się do mnie per Pan jest odrobinkę nietrafione.
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: 22.08.2025 - 01:36