Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [css] dwa divy obok siebie
arzach
post 7.08.2011, 20:47:22
Post #1





Grupa: Zarejestrowani
Postów: 332
Pomógł: 6
Dołączył: 27.11.2008

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


mam taki kod
  1. <div>
  2. <div style="float:left;">tekst 1</div>
  3. <div style="float:right;">tekst 2</div>
  4. </div>


I jak zrobić by napisy było obok siebie na środku strony ?

Go to the top of the page
+Quote Post
cykcykacz
post 7.08.2011, 21:16:20
Post #2





Grupa: Zarejestrowani
Postów: 550
Pomógł: 9
Dołączył: 29.05.2009
Skąd: Ostrów Wielkopolski

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


Bawiłem się trochę ale bez pomysłu, jedyne do czego doszedłem to:
Kod
<div style="width: 200px; margin-right: auto; margin-left: auto;">
    <div style="float:right;">tekst 1</div>
    <div style="float:left;">tekst 2</div>
</div>
Go to the top of the page
+Quote Post
CuteOne
post 7.08.2011, 21:51:44
Post #3





Grupa: Zarejestrowani
Postów: 2 958
Pomógł: 574
Dołączył: 23.09.2008
Skąd: wiesz, że tu jestem?

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


Nie wiem czy o taki efekt ci chodziło:
  1. <div>
  2. <div style="float:left;text-align: right;">tekst 1</div>
  3. <div style="float:right;text-align: left;">tekst 2</div>
  4. </div>


Ten post edytował CuteOne 7.08.2011, 21:52:43
Go to the top of the page
+Quote Post
kamil4u
post 7.08.2011, 22:38:02
Post #4





Grupa: Zarejestrowani
Postów: 2 350
Pomógł: 512
Dołączył: 4.01.2009
Skąd: Wrocław / Świdnica

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


Sposobów jest mnóstwo smile.gif
  1. <div>
  2. <div style="float:left; text-align: right; width: 50%;">tekst 1</div>
  3. <div style="float:right; width: 50%;">tekst 2</div>
  4. </div>



--------------------
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: 12.06.2025 - 21:39