Sfondo con ombra .....

searedone

Utente Attivo
11 Giu 2010
508
0
0
Ciao a tutti ,
chiedo il vostro aiuto ...

nel sito che sto costruendo ho messo un css ( posto sotto il cod ) che mi crea un layout con bordo grigio e body bianco.

La domanda è questa:

Io vorrei che il body bianco abbia l'ombra , qualcuno sa dirmi cosa posso aggiungere al mio css per dargli questo effetto !?!??!?

Tra l'altro ho provato con delle immagini ma poi anche ottimizzandolo su iphone si vede da schifo invece in questo modo si vede benissimo ....

Help please ....

<style type="text/css">
<!--
body {
font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
background: #42413C;
margin: 0;
padding: 0;
color: #000;
background-color: #CCC;
}

/* ~~ Element/tag selectors ~~ */
ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
padding: 0;
margin: 0;
}
h1, h2, h3, h4, h5, h6, p {
margin-top: 0; /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
padding-right: 30px;
padding-left: 30px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */
}
a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
border: none;
}
/* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
a:link {
color: #42413C;
text-decoration: underline; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
}
a:visited {
color: #6E6C64;
text-decoration: underline;
}
a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
text-decoration: none;
}

/* ~~ this fixed width container surrounds all other elements ~~ */
.container {
width: 900px;
background: #FFF;
margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout */
}

/* ~~ This is the layout information. ~~

1) Padding is only placed on the top and/or bottom of the div. The elements within this div have padding on their sides. This saves you from any "box model math". Keep in mind, if you add any side padding or border to the div itself, it will be added to the width you define to create the *total* width. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design.

*/
.content {

padding: 0px 0;
}

/* ~~ miscellaneous float/clear classes ~~ */
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
float: right;
margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
float: left;
margin-right: 8px;
}
.clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the overflow:hidden on the .container is removed */
clear:both;
height:0px;
font-size: 0px;
line-height: 0px;
}
-->
</style>
 

searedone

Utente Attivo
11 Giu 2010
508
0
0
grazie milleeeeeeeeeeeeeeeeeeeeeeeeeeeee :)

DAvvero grazie mille , tutti mi consigliavano le immagini ma mi veniva da schifo ...

Tu sai se all'interno del container posso anche metterci un'immagine di sfondo magari una foto che funga da sfondo traparente ??!?!?

NEl caso grazie mille lo stesso
 

searedone

Utente Attivo
11 Giu 2010
508
0
0
mhhhh !!!!

Ho provato ma non me la prende ?!? ho meglio forse sbaglio qualcosa ....

Sai per caso cosa devo scrivere di preciso nel container ,, !!??!
 

borgo italia

Super Moderatore
Membro dello Staff
SUPER MOD
MOD
4 Feb 2008
16.046
150
63
PR
www.borgo-italia.it
ciao
ecco un esempio, però devi togliere *background: #FFF; e sostituirlo con background-color:#FFFFFF; altrimenti si sovrappone il colore di sfondo con l'immagine e, in questo caso vedi solo il colore

Codice:
.container {
background-image:url(../_0_BORGO-ITALIA/_file-Servizio/IT.png);
background-repeat:repeat;
height:100px;
width: 900px;
background-color:#FFFFFF;
/*background: #FFF;*/
margin: 0 auto;
box-shadow:10px 10px 20px #ff0000;
-webkit-box-shadow:10px 10px 20px #ff0000;
-moz-box-shadow: 10px 10px 20px #ff0000;
}
ricordati pero di provarlo con firefox, con ie non vedi l'ombra
 

searedone

Utente Attivo
11 Giu 2010
508
0
0
Ho provato ......

Ma niente non funziona neanche con le dovute correzzioni !?!?!?

.container {
background-image:url(ferrari.png);


width: 900px;
background-color:#FFFFFF;
/*background: #FFF;*/
margin: 0 auto;
box-shadow:10px 10px 20px #ff0000;
-webkit-box-shadow:10px 10px 20px #ff0000;
-moz-box-shadow: 10px 10px 20px #ff0000;
}
 

borgo italia

Super Moderatore
Membro dello Staff
SUPER MOD
MOD
4 Feb 2008
16.046
150
63
PR
www.borgo-italia.it
ciao
controlla bene perche con ff funzia

HTML:
<style type="text/css">
<!--
.container {
background-image:url(../_0_BORGO-ITALIA/_file-Servizio/IT.png);
/*background-repeat:repeat;*/
/*height:100px;*/
width: 900px;
background-color:#FFFFFF;
/*background: #FFF;*/
margin: 0 auto;
box-shadow:10px 10px 20px #ff0000;
-webkit-box-shadow:10px 10px 20px #ff0000;
-moz-box-shadow: 10px 10px 20px #ff0000;
}
-->
</style>
</head>
<body>
<div class="container">PINCO PALLO</div>
</body>
</html>
questo è il risultato
0_ombra.jpg

p.s.
guarda che il div (visto che non gli hai dato l'altezza) deve contenere qualcosa, altrimenti non lo vedi
 
Discussioni simili
Autore Titolo Forum Risposte Data
A Immagine decentrata con sfondo trasparente Photoshop 0
G Fare uno sfondo con il prato e degli alberi Photoshop 0
Domenico_Falco1 [Javascript] [HTML] Campi form con sfondo imposto dal browser Javascript 5
L [HTML] problema sfondo tutto schermo con immagine HTML e CSS 1
L [HTML] Problemino con le immagini di sfondo HTML e CSS 4
R [Flash] Animare un testo con un' immagine sullo sfondo Windows e Software 7
D [HTML] Sfondo-Background fisso ma non troppo con effetto in movimento HTML e CSS 4
Papalla CSS3 - immagine di sfondo con elementi che appaiono col mouse hover HTML e CSS 4
R Sfondo animato per sito con Adobe Muse Windows e Software 3
Fuego2806 Stampare dati Form su immagine di sfondo con html HTML e CSS 1
Fuego2806 [PHP] Stampare dati Form su immagine di sfondo con html PHP 70
Gregia Immagine con testo affianco (sfondo colore diverso) HTML e CSS 8
utente testo scorrevole con sfondo colorato con css esterno HTML e CSS 6
I Salve, ho un probelma con una mappa d'immagini usata come sfondo HTML e CSS 3
C Div con bordi come sfondo HTML e CSS 6
R Come centrare il testo in un paragrafo con sfondo colorato? HTML e CSS 2
R Sostiture il colore di sfondo di un'immagine con canvas e drawImage... dove sbaglio? Javascript 1
Mauro Guardiani video come sfondo problemi con explorer 11 PHP 0
voldemort Sfondo parallasse con scroll e ritardo Javascript 1
L Sfondo pagina web con php PHP 1
F problema con sfondo CSS HTML e CSS 2
G Inserire un immagine di sfondo con un disegno base Photoshop 1
L Bottone con immagine di sfondo HTML e CSS 2
A sfondo 100% con flash cs5 Flash 7
voldemort Immagine di sfondo fissa con CSS HTML e CSS 1
G Realizzare un'immagine con sfondo trasparente con Photoshop Photoshop 3
M problema con dreamweaver: immagini sfondo Webdesign e Grafica 2
WorldWideWeb textbox con sfondo trasparente ASP.NET 1
L sfondo con testo HTML e CSS 0
L problemi con l'immagine di sfondo da ripetere Webdesign e Grafica 1
V Problema sfondo solo con Internet Explorer HTML e CSS 0
Angel0 Rotazione immagine di sfondo con css HTML e CSS 3
T Sfondo con Scritte Ripetute Photoshop 4
P riccioli con photoshop sullo sfondo? Webdesign e Grafica 5
F sfondo opaco con div in primo piano Javascript 2
M Problema CSS nei widget con sfondo sfumato HTML e CSS 0
B Adattare tabella a immagine di sfondo con Dreamweaver Cs3 Webdesign e Grafica 3
F Sfondo in tabella con dreamweaver Webdesign e Grafica 3
D inserire sfondo con l'html HTML e CSS 1
A Flash: Problema con colore di sfondo separati per scena Flash 0
S creare un colore di sfondo degre con css HTML e CSS 4
S fondere immagine con sfondo Webdesign e Grafica 3
S problema con foto come sfondo HTML e CSS 13
F png con sfondo trasparente Photoshop 0
D problemi con la dimensione dello sfondo... please!!! HTML e CSS 2
M Sfocare sfondo Photoshop CS6 Photoshop 2
K Sfondo nuovo file Photoshop 0
F Aiuto! cambio immagine di sfondo al cambio pagina HTML e CSS 2
gara1 inserire immagine di sfondo in canvas Javascript 0
Y cambiare sfondo di una pagina Javascript 1

Discussioni simili