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
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:
(IMG:http://img231.imageshack.us/img231/5128/prawiews1.gif)
wyjadę się wszystko dobrze (kolor specjalnie taki zrobiłem żeby było widać (IMG:http://forum.php.pl/style_emoticons/default/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:
(IMG:http://img87.imageshack.us/img87/3219/zle1xm5.gif)
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
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
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 26.12.2025 - 17:03