|
|
| Ho un problemino con questo calendario. Non riesco ad allineare per bene il testo. Premetto che è il mio secondo calendario e che prova e riprova sono riuscita a spostarlo dov'è ora ma è probabilissimo che facendo così abbia "smontato" altre parti e mi ci sono persa.. non so più dove mettere le mani. Ora, prima di iniziare a smoccolare in turco antico vi chiedo aiuto Vorrei il testo leggermente più spostato verso sx, non appiccicato com'è ora al bordo. CODICE <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Calendario</title> <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"> <style type="text/css"> <!--
/* struttura generale della pagina*/ body { background-color:#20122a; /* colore di sfondo della pagina*/ margin: 0px; /* margine dal bordo*/ }
.kaleela{ width:120px; /* larghezza tabella, deve coincidere con l'immagine che abbiamo creato*/ height:125px; /* altezza tabella calendario*/ font-family:Verdana, Arial, Helvetica, sans-serif; /* font della pagina, si consiglia di inserirne più di uno*/ font-size:10px; /*grandezza del font dei giorni del mese*/ color:#c8b3a0; /*colore dei giorni del mese*/ text-align: right; }
/* struttura della scritta del mese*/
.mese { font-family: Monotype Corsiva, Arial; /* tipo di font del mese corrente*/ font-size: 13px; /* grandezza font del mese corrente*/ color: #8a50b4; /* colore font del mese corrente*/ text-align: center; }
/* struttura della scritta dei giorni della settimana*/
.settimana { font-family: Monotype Corsiva, Arial; /* tipo di font dei giorni della settimana*/ font-size: 12px; /* grandezza del font dei giorni della settimana*/ color: #8a50b4; /* colore del font dei giorni della settimana*/ }
.oggi { font-family: Verdana, Arial, Helvetica, sans-serif; /* tipo di font del giorno corrente*/ font-size: 10px; /* grandezza del font del giorno corrente*/ color: #ebc4fe; /* colore del font del giorno corrente*/ font-weight: bold; /* spessore del font del giorno corrente*/ text-align: center; }
--> </style></haed> </head>
<body>
<table width="225" height="125" background="http://digilander.libero.it/Kaleela/calendari/dragoceltico.jpg"
border="0" cellpadding="0" cellspacing="0"> <tr><td width="25" height="0"> </td></tr> <tr><td width="25" height="0">
<script type="text/javascript" language=JavaScript> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!--//Begin monthnames = new Array( "Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"); var linkcount=0; function addlink(month, day, href) { var entry = new Array(3); entry[0] = month; entry[1] = day; entry[2] = href; this[linkcount++] = entry; } Array.prototype.addlink = addlink; linkdays = new Array(); monthdays = new Array(12); monthdays[0]=31; monthdays[1]=28; monthdays[2]=31; monthdays[3]=30; monthdays[4]=31; monthdays[5]=30; monthdays[6]=31; monthdays[7]=31; monthdays[8]=30; monthdays[9]=31; monthdays[10]=30; monthdays[11]=31; todayDate=new Date(); thisday=todayDate.getDay(); thismonth=todayDate.getMonth(); thisdate=todayDate.getDate(); thisyear=todayDate.getYear(); thisyear = thisyear % 100; thisyear = ((thisyear < 50) ? (2000 + thisyear) : (1900 + thisyear)); if (((thisyear % 4 == 0) && !(thisyear % 100 == 0)) ||(thisyear % 400 == 0)) monthdays[1]++; startspaces=thisdate; while (startspaces > 7) startspaces-=7; startspaces = thisday - startspaces + 1; if (startspaces < 0) startspaces+=7;
document.write("<table border=0 " ); <!--bordo--> document.write("align='right' "); <!--allineamento tabella--> document.write("cellpadding=0 cellspacing=0 "); <!-- cell padding, cell spacing --> document.write("class='kaleela'>"); <!-- classe per modificare gli stili dei giorni del mese--> document.write("<tr> <td class='mese' colspan='7'><strong>" + monthnames[thismonth] + " " + thisyear + "</strong></td></tr>"); <!-- questo codici indica la visualizzazione del mese corrente--> document.write("<tr>"); document.write("<td align=center class='settimana'>Dom</td>"); document.write("<td align=center class='settimana'>Lun</td>"); document.write("<td align=center class='settimana'>Mar</td>") document.write("<td align=center class='settimana'>Mer</td>"); document.write("<td align=center class='settimana'>Giov</td>"); document.write("<td align=center class='settimana'>Ven</td>"); document.write("<td align=center class='settimana'>Sab</td>"); document.write("</tr>"); <!-- questo codici indica la visualizzazione dei giorni della settimana--> document.write("<tr>"); for (s=0;s<startspaces;s++) { document.write("<td>-</td>"); } count=1; while (count <= monthdays[thismonth]) { for (b = startspaces;b<7;b++) { linktrue=false; document.write("<td>"); for (c=0;c<linkdays.length;c++) { if (linkdays[c] != null) { if ((linkdays[c][0]==thismonth + 1) && (linkdays[c][1]==count))
{ document.write("<a href="" + linkdays[c][2] + "">"); linktrue=true; } } } if (count==thisdate) { document.write("<span class='oggi'>"); <!-- stile per il giorno corrente--> } if (count <= monthdays[thismonth]) { document.write(count); } else { document.write(" "); } if (count==thisdate) { document.write("</span>"); } if (linktrue) document.write("</a>"); document.write("</td>"); count++; } document.write("</tr>"); document.write("<tr>"); startspaces=0; } document.write("</table>");
</script></td></tr></table> <div id="Layer1" style="position:absolute; width:225px; height:125px; z-index:1; left: 0px; top: 0px;"> <a href="http://kaleela.altervista.org" target="_blank"><img src="http://digilander.libero.it/Kaleela/calendari/dragocelticob.gif" border="0" alt="©Kaleela"></a> </div>
</body> </html> Ho messo il codice sotto spoiler che è un botto di roba.. help...
|
| |