QUAL E' IL TRUCCO X TENERE SEMPRE CENTRALE NELLA FINESTRA
DEL BROWSER LA PAGINA CHE NOI DISEGNAMO?
GRAZIE X L'AIUTO...
QUAL E' IL TRUCCO X TENERE SEMPRE CENTRALE NELLA FINESTRA
DEL BROWSER LA PAGINA CHE NOI DISEGNAMO?
GRAZIE X L'AIUTO...
uhmm avrò capito bene? :master:
<head>
<style type="text/css">
body {
text-align: center;
}
</style>
</head>
oppure per un oggetto specifico
<head>
<style type="text/css">
.oggetto {
text-align: center;
}
</style>
</head>
<body>
<div class="oggetto">
blabla... [img][/img]
</div>
</body>
ciao
__________________________________________________ _
chi ben comincia... ha cominciato bene... tutto qua !! :ignore:
GRAZIE!!!
...ma non cambia nulla...
e allora nn ho capito mica il problema...
hai un link della pagina da postare o il codice
e cosa dovrebbe fare e non fa?
SCUSAMI..MA VOGLIO IMPARARE E MI MANCA ANCORA TANTO...
..STO FACENDO UN SITO X ALCUNI MIEI AMICI E VORREI CHE
LA PAGINA RIMANESSE SEMPRE CENTRALE,
QUALSIASI SIA LA GRANDEZZA DELLA FINESTRA DEL BROWSER.
E NON "INCOLLATA" ALLA PARTE SINISTRA!
GRAZIE.
CIAO!!
prima di qualsiasi contenuto (fra <body> e </body>) devi mettere:Originariamente inviato da MONIC
SCUSAMI..MA VOGLIO IMPARARE E MI MANCA ANCORA TANTO...
..STO FACENDO UN SITO X ALCUNI MIEI AMICI E VORREI CHE
LA PAGINA RIMANESSE SEMPRE CENTRALE,
QUALSIASI SIA LA GRANDEZZA DELLA FINESTRA DEL BROWSER.
E NON "INCOLLATA" ALLA PARTE SINISTRA!
GRAZIE.
CIAO!!
<div align="center">
[ contenuto ]
</div>
![]()
esatto , che poi sarebbe la stessa cosa che ti ho scritto io, ma riproposto "in linea" ;
il senso dei css e' separare contenuto e stile, percio' magari andrebbe la formattazione
nell' head o ancora meglio in un file css esterno e nn in linea , altrimenti basterebbe anche
<center>
........wnjwnbnw
</center>
ma il risultato e' lo stesso quindi ok per <div align="center"> </div> che contiene il contenuto da centrare
o per la specifica nell'head quale body o quale classe come ti ho scritto su.
se nn ti funge , ti manca qualche pezzo e nel caso copiaci il codice.
facci sapere ciaoo![]()
Codice PHP:
<html>
<head>
<title>titolo</title>
<style type="text/css">
html, body {
margin: 0px;
padding: 0px;
}
body {
text-align: center;
background-color: rgb(102,102,102);
}
.pagina {
width: 720px;
margin-top: 0px;
margin-right: auto;
margin-bottom: auto;
background-color: rgb(255,255,255);
}
</style>
</head>
<body>
<div class="pagina">
<h1>il mio contenuto</h1>
va messo quà sullo sfondo bianco</p>
</div>
</body>
</html>
ma che serve tutta sta roba x centrare? :-D
ma chi sei sempre monic?? nn capisco