|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Senior Member
Iscritto dal: Jul 2001
Messaggi: 3484
|
[HTML] Immagini e paragrafi
Sono incappato in questo problema: voglio scrivere un paragrafo con dentro un'immagine, allineata a destra o a sinistra, e dare un colore di sfondo e un bordo all'intero paragrafo, compresa l'immagine. Non c'è nessun problema se il testo è più lungo dell'immagine, ma se l'immagine è più lunga, questa "sfora" sotto il bordo e va pure nel paragrafo dopo...
Qualcuno conosce una soluzione??
__________________
www.biffuz.it | Thou shall not follow the NULL pointer, for chaos and madness await thee at its end. Powered by: M1 @ Sonoma | 7600X @ W11 | C2Q @ XP | P!!! @ W98+BeOS | 286 @ W3.1 | C64 | iP16 | iPad8 | rPi4 | and more... |
![]() |
![]() |
![]() |
#2 |
Senior Member
Iscritto dal: Jul 2003
Città: Provincia PI
Messaggi: 905
|
Non so se ho capito bene il problema... ma proverei con la proprietà CSS clear applicata al paragrafo o cmq all'elemento di tipo block successivo al tuo paragrafo con l'immagine.
Ovvero se il tuo paragrafo più o meno è così: Codice HTML:
<p style="background-color:red; border:1px solid green"><img src="url_immagine" style="float:left" />testo del tuo paragrafo</p> Codice HTML:
<p style="clear:both">testo del paragrafo successivo a quello con l'immagine</p>
__________________
R7 5700X < Noctua NH-D14 > Asus ROG Strix X570-F, Lepa G1000-MA, TeamGroup T-Force Vulcan Z 32GB 3200Mhz, M2 Crucial P5+, Palit GTX 1660 Ti StormX > Benq EW3280U, Asus Xonar Essence STX > NAD C350 > ProAc Tablette 2000, Corsair Obsidian 650D. 12 trans. merc. |
![]() |
![]() |
![]() |
#3 | |
Senior Member
Iscritto dal: Jul 2001
Messaggi: 3484
|
Quote:
Possibile che non ci abbiano pensato?? L'unica soluzione che mi viene in mente è affidarsi ad una table...
__________________
www.biffuz.it | Thou shall not follow the NULL pointer, for chaos and madness await thee at its end. Powered by: M1 @ Sonoma | 7600X @ W11 | C2Q @ XP | P!!! @ W98+BeOS | 286 @ W3.1 | C64 | iP16 | iPad8 | rPi4 | and more... |
|
![]() |
![]() |
![]() |
#4 | |
Senior Member
Iscritto dal: Jul 2003
Città: Provincia PI
Messaggi: 905
|
Quote:
Allora lascia stare clear e metti la proprietà height = pixel della foto in altezza al paragrafo (or ora testato e funzionante in FF2, IE7, IE6, IE5.5, Opera9) ![]() Codice HTML:
<p style="background-color:red; border:1px solid green; padding:10px; height:793px"> <img src="url_immagine" width="606" height="793" style="float:left; margin-right:10px" /> testo </p> <p>testo del paragrafo successivo a quello con l'immagine</p>
__________________
R7 5700X < Noctua NH-D14 > Asus ROG Strix X570-F, Lepa G1000-MA, TeamGroup T-Force Vulcan Z 32GB 3200Mhz, M2 Crucial P5+, Palit GTX 1660 Ti StormX > Benq EW3280U, Asus Xonar Essence STX > NAD C350 > ProAc Tablette 2000, Corsair Obsidian 650D. 12 trans. merc. Ultima modifica di phlebotomus : 29-07-2007 alle 20:09. Motivo: Aggiunti browser in cui funge... |
|
![]() |
![]() |
![]() |
#5 | |
Senior Member
Iscritto dal: Jul 2001
Messaggi: 3484
|
Quote:
Mi viene voglia di scrivere al W3 e far loro notare il problema, così che inseriscano una soluzione nelle specifiche HTML 5...
__________________
www.biffuz.it | Thou shall not follow the NULL pointer, for chaos and madness await thee at its end. Powered by: M1 @ Sonoma | 7600X @ W11 | C2Q @ XP | P!!! @ W98+BeOS | 286 @ W3.1 | C64 | iP16 | iPad8 | rPi4 | and more... |
|
![]() |
![]() |
![]() |
#6 |
Senior Member
Iscritto dal: Jul 2003
Città: Provincia PI
Messaggi: 905
|
In questi casi vige la regola del male minore, che si chiama TABLETRTD
![]()
__________________
R7 5700X < Noctua NH-D14 > Asus ROG Strix X570-F, Lepa G1000-MA, TeamGroup T-Force Vulcan Z 32GB 3200Mhz, M2 Crucial P5+, Palit GTX 1660 Ti StormX > Benq EW3280U, Asus Xonar Essence STX > NAD C350 > ProAc Tablette 2000, Corsair Obsidian 650D. 12 trans. merc. |
![]() |
![]() |
![]() |
#7 | |
Senior Member
Iscritto dal: Jul 2001
Messaggi: 3484
|
Quote:
![]()
__________________
www.biffuz.it | Thou shall not follow the NULL pointer, for chaos and madness await thee at its end. Powered by: M1 @ Sonoma | 7600X @ W11 | C2Q @ XP | P!!! @ W98+BeOS | 286 @ W3.1 | C64 | iP16 | iPad8 | rPi4 | and more... |
|
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 18:51.