Ok. Corretto subito </p>
Ottimo il consiglio per il nome.
Ho quindi creato una classe "datacolore" da assegnare al codice JS nel div "data".
codice:
<body onload="MM_preloadImages('../images/graphics/homehov.png','../images/graphics/workhov.png')">
<div id="contenitore">
<div id="header">[img]../images/graphics/portfolio.png[/img]</div>
<div id="navigazione">
<a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage
...CONTINUA CON IL CODICE PER IL ROLLOVER...
....
-->
</div>
<div id="data">
<p class="datacolore">
<script type="text/javascript">
<!--
var data = new Date();
var set, gg, mm, aaaa, h, m, s;
//Crea la tabella dei mesi
var mesi = new Array();
mesi[0] = "GENNAIO";
mesi[1] = "FEBBRAIO";
mesi[2] = "MARZO";
mesi[3] = "APRILE";
mesi[4] = "MAGGIO";
mesi[5] = "GIUGNO";
mesi[6] = "LUGLIO";
mesi[7] = "AGOSTO";
mesi[8] = "SETTEMBRE";
mesi[9] = "OTTOBRE";
mesi[10] = "NOVEMBRE";
mesi[11] = "DICEMBRE";
//Crea la tabella dei giorni della settimana
var giorni = new Array();
giorni[0] = "DOMENICA";
giorni[1] = "LUNEDI";
giorni[2] = "MARTEDI";
giorni[3] = "MERCOLEDI";
giorni[4] = "GIOVEDI";
giorni[5] = "VENERDI";
giorni[6] = "SABATO";
//Estrae dalla tabella il giorno della settimana
set = giorni[data.getDay()] + " ";
gg = data.getDate() + " ";
//Estrae dalla tabella il mese
mm = mesi[data.getMonth()] + " ";
aaaa = data.getFullYear();
h = data.getHours() + ":";
m = data.getMinutes() + ":";
s = data.getSeconds();
document.write(" " + set + gg + mm + aaaa + ", ore " + h + m + s);
//-->
</script>
</p>
</div>
Poi nel master.css ho creato la regola:
codice:
...
#navigazione {
height:25px;
width: 978px;
background-color: #CCC;
background-image: none;
}
#data{
height: 31px;
background-image: url(../images/graphics/calendario.png);
background-repeat: no-repeat;
text-align: left;
color: #000;
text-transform: none;
}
.datacolore {
color: #FFF;
font-size: 12px;
font-weight: bolder;
}
#barradata {
height: 30px;
width: 400px;
background-color: #969898;
}
DOMANDA:
1)come mai ho quello spazio tra la barra di navigazione e la barra della data? (sito qui)
E' forse sbagliato usare
per poi assegnargli una classe?
2)come faccio a centrare la scritta nella barra della data.