Home › Forum › Plugin e temi di WP › Domanda sui CSS e sfondi a gradiente
-
AutorePost
-
-
15 Ottobre 2007 alle 17:29 #4825oruxPartecipante
Ciao a tutti,
vorrei riuscire a usare un’immagine gradiente per la parte superiore della pagina e contemporaneamente un’altra immagine gradiente per la parte inferiore della pagina… come si fa?
Riesco soltanto a fare l’una o l’altra cosa con una riga di codice tipo queste:
body {background: #ffffff url(\"<?php bloginfo('stylesheet_directory'); ?>/images/1x334.jpg\") repeat-x top;}
oppure
body {background: #ffffff url(\"<?php bloginfo('stylesheet_directory'); ?>/images/1x334.jpg\") repeat-x bottom;}
Grazie dell’aiuto
-
15 Ottobre 2007 alle 19:56 #47383andreaPartecipante
Si può specificare una sola immagine di sfondo per ciascuna entità HTML, quindi il body può avere un solo sfondo. Una maniera per aggirare l’ostacolo è usare una sola immagine, composta dalle due iniziali.
-
16 Ottobre 2007 alle 0:14 #47388oruxPartecipante
Si può specificare una sola immagine di sfondo per ciascuna entità HTML, quindi il body può avere un solo sfondo. Una maniera per aggirare l’ostacolo è usare una sola immagine, composta dalle due iniziali.
Considerando che al centro della pagina vi sia una zona “dinamica”, e che un’immagine unica non sia compatibile con eventuali sfumature che delimitano i bordi della pagina, mi chiedevo se si potesse aggirare l’ostacolo imponendo il background con gradiente a degli elementi “div” incastrati a dovere anziché al body. Non ci riesco.
Per esempio mi basterebbe, credo, capire come è stato realizzato questo:
Anzi, se quel tema fosse scaricabile, non mi dispiacerebbe guardagli dentro al cofano
-
16 Ottobre 2007 alle 23:23 #47410andreaPartecipante
Potresti inserire, subito dopo l’header, un div vuoto a cui applicare uno sfondo sfumato. Un altro div vuoto potrebbe essere inserito subito prima del footer, con un secondo sfondo sfumato.
-
17 Ottobre 2007 alle 7:21 #47411oruxPartecipante
Ciao grazie,
più o meno è come dicevamo… ci sono riuscito. E’ un po’ lunga da spiegare.
Comunque, bisogna creare una serie di div a incastro: come nelle bamboline matriosca.
Per la parte superiore della pagina bisogna creare una struttura tipo:
1° contenitore vuoto con sfondo: specificando height in px, mentre width va impostato a 100%;
2° contenitore vuoto con indicazioni per centrare la pagina, con width in px;
3° contenitore con l’header: con height e width in px.
Il 1° contiene il 2° che contiene il 3°.
Lo stesso vale per ogni fascia in cui suddividiamo la pagina fino alla parte inferiore.
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.