Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [css] układ, 2 elementy po dodaniu tekstu obrazek spada
Lejto
post 1.02.2009, 15:40:02
Post #1





Grupa: Zarejestrowani
Postów: 1 385
Pomógł: 48
Dołączył: 23.05.2007

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


Mam taki kod:
  1. <div id="img6">
  2. <div id="img7"> </div>
  3. </div>

css:
  1. #img6{
  2. background-image:url(../images/helltorrents33.gif);
  3. width:700px;
  4. height:435px;
  5. overflow:hidden;
  6. clear:both;
  7. }
  8. #img7{
  9. background-image:url(../images/helltorrents.gif);
  10. width:175px;
  11. height:435px;
  12. background-repeat:no-repeat;
  13. float:right;
  14.  
  15. }

wynik:

wyjadę się wszystko dobrze (kolor specjalnie taki zrobiłem żeby było widać winksmiley.jpg)

jak dodam jakiś tekst w:
  1. <div id="img6">
  2. <div id="img7"> </div>
  3. </div>

np.
  1. <div id="img6">a
  2. <div id="img7"> </div>
  3. </div>

to staje się tak:

obrazek po prawej spada ;/ co zrobić?

Ten post edytował Lejto 1.02.2009, 15:40:22


--------------------
Go to the top of the page
+Quote Post
Lion_87
post 2.02.2009, 17:29:35
Post #2





Grupa: Zarejestrowani
Postów: 850
Pomógł: 120
Dołączył: 15.02.2007
Skąd: Łódź

Ostrzeżenie: (10%)
X----


Rozwiązaniem może być potraktowanie #img6 jako box i wstawienie jeszcze jednego Diva
  1. <div id="box">
  2. <div id="img6"> </div><----float:left
  3. <div id="img7"> </div><----float:right
  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: 14.06.2025 - 22:13