![]() |
![]() |
![]()
Post
#1
|
|
![]() Grupa: Zarejestrowani Postów: 850 Pomógł: 120 Dołączył: 15.02.2007 Skąd: Łódź Ostrzeżenie: (10%) ![]() ![]() |
Witam.
Mam problem bo nie mogę wyśrodkować tekstu. Chodzi mi o tą cześć na samym dole. Lewa strona jest na górze a prawa na dole. Ja chciałbym aby byly oba te teksty buły na środku. ![]() A tak w plikach: Kod #mydol { clear: both; width: 700px; height: 25px; margin-left: auto; margin-right: auto; } #mydol1 { background: transparent url(redprofil/tlo/mydol01.png) 0 0 no-repeat; width: 340px; height: 25px; float: left; } #mydol2 { background: transparent url(redprofil/tlo/mydol02.png) 0 0 no-repeat; width: 360px; height: 25px; float: right; } W jaki sposób wyśrodkować ten tekst? Ten post edytował Lion_87 1.12.2008, 12:06:26 |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 106 Pomógł: 0 Dołączył: 13.11.2008 Ostrzeżenie: (0%) ![]() ![]() |
A moze
Kod <div id="mydol2" style="margin-left:auto; margin-right:auto;"> albo dopisz to w CSSie
|
|
|
![]()
Post
#3
|
|
![]() Grupa: Moderatorzy Postów: 8 989 Pomógł: 1550 Dołączył: 8.08.2008 Skąd: Słupsk/Gdańsk ![]() |
Kod #mydol1 {
background: transparent url(redprofil/tlo/mydol01.png) 0 0 no-repeat; width: 340px; height: 25px; float: left; text-align: right; } #mydol2 { background: transparent url(redprofil/tlo/mydol02.png) 0 0 no-repeat; width: 360px; height: 25px; float: right; text-align: left; } -------------------- |
|
|
![]()
Post
#4
|
|
![]() Grupa: Zarejestrowani Postów: 850 Pomógł: 120 Dołączył: 15.02.2007 Skąd: Łódź Ostrzeżenie: (10%) ![]() ![]() |
Hmmm chodziło mi o uzyskanie takiego efektu
![]() I taki uzyskuje korzystając z <tr>, <td>.... Chciałem się dowiedzieć czy bez tego na samym div da sie zribić? |
|
|
![]()
Post
#5
|
|
![]() Grupa: Moderatorzy Postów: 8 989 Pomógł: 1550 Dołączył: 8.08.2008 Skąd: Słupsk/Gdańsk ![]() |
Wiec mów ze chodzi o wycentrowanie w pionie...
da się.. Kod #element { display: table-cell; vertical-align: middle; } A tak wogóle to źle dałes diva z float: right; Powinien być przed tym z float: left;. -------------------- |
|
|
![]()
Post
#6
|
|
![]() Grupa: Zarejestrowani Postów: 850 Pomógł: 120 Dołączył: 15.02.2007 Skąd: Łódź Ostrzeżenie: (10%) ![]() ![]() |
Teraz to tak wygląda:
![]() Kod #mydol {
clear: both; width: 700px; height: 25px; margin-left: auto; margin-right: auto; } #mydol1 { background: transparent url(redprofil/tlo/mydol01.png) 0 0 no-repeat; width: 340px; height: 25px; float: left; display: table-cell; vertical-align: middle; } #mydol2 { background: transparent url(redprofil/tlo/mydol02.png) 0 0 no-repeat; width: 360px; height: 25px; float: right; display: table-cell; vertical-align: middle; } |
|
|
![]()
Post
#7
|
|
![]() Grupa: Moderatorzy Postów: 8 989 Pomógł: 1550 Dołączył: 8.08.2008 Skąd: Słupsk/Gdańsk ![]() |
To sprobuje inne wartosci vertical-align. Jak to nie pomoze to dodaj padding-top
-------------------- |
|
|
![]()
Post
#8
|
|
![]() Grupa: Zarejestrowani Postów: 850 Pomógł: 120 Dołączył: 15.02.2007 Skąd: Łódź Ostrzeżenie: (10%) ![]() ![]() |
Super. Tak działa idealnie.
Kod #mydol { clear: both; width: 700px; height: 25px; margin-left: auto; margin-right: auto; } #mydol1 { background: transparent url(redprofil/tlo/mydol01.png) 0 0 no-repeat; width: 340px; height: 25px; float: left; padding-top: 4px; } #mydol2 { background: transparent url(redprofil/tlo/mydol02.png) 0 0 no-repeat; width: 360px; height: 25px; float: right; padding-top: 4px; } Dzięki wookieb |
|
|
![]() ![]() |
![]() |
Aktualny czas: 21.08.2025 - 06:06 |