Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [CSS][HTML] Margin auto znowu nie centruje
UczMnieProsze
post 14.10.2015, 19:36:12
Post #1





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 13.12.2014

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


Mógłbym poprosić o info, czemu bilet_270 mi się nie centruje? Trzyma się chamsko lewej strony.
Te elementy nie są w żadnym innym divie, są bezpośrednio w niepozycjonowanym body.
  1. .secondBanner{
  2. height:360px;
  3. width:auto;
  4. background-color:#eceeed;
  5. }
  6. .bilet_270{
  7. height:360px;
  8. margin-left:auto;
  9. margin-right:auto;
  10. }


  1. <div class="secondBanner">
  2. <img class="bilet_270" src="/images/Karolina_GFX/bilet_270.jpg">
  3. </div>
Go to the top of the page
+Quote Post
trueblue
post 14.10.2015, 19:38:57
Post #2





Grupa: Zarejestrowani
Postów: 6 806
Pomógł: 1828
Dołączył: 11.03.2014

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


Ale .bilet_270 jest w divie, a ten się nie centruje.


--------------------
Go to the top of the page
+Quote Post
miras
post 14.10.2015, 19:40:06
Post #3





Grupa: Zarejestrowani
Postów: 1 004
Pomógł: 9
Dołączył: 18.01.2011
Skąd: Siedlce

Ostrzeżenie: (30%)
XX---


Dodaj: display: block; do .bilet_270


--------------------
Go to the top of the page
+Quote Post
-matuty-
post 16.10.2015, 21:07:58
Post #4





Goście







Może spróbujesz tak?

.secondBanner > img {
height:360px;

margin-left:auto;

margin-right:auto;
}
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:14