Ciao,
Stavo progettando la pagina web per il mio sito web ma ho un problema.
Ecco il mio foglio di stile (parziale)
Ecco il codice del file htmlcodice:body {background-color: #242424} #container {background-color: #DDDDDD; width: 100px; height: 100px; border: 2px solid #808080} #header {height: 150px} #menu {height: 30px; background-image: url(/images/menu_bg.png); background-repeat: repeat-x; color: #FFFFFF} #menu a:link {height: 30px; background-image: url(/images/menu_bg.png); background-repeat: repeat-x; color: #FFFFFF} #menu a:hover {height: 30px; background-image: url(/images/menu_bg.png); background-repeat: repeat-x; color: #FFFFFF; text-decoration: underline} #menu a:visited {height: 30px; background-image: url(/images/menu_bg.png); background-repeat: repeat-x; color: #FFFFFF}
Mettendo <div id="container"> il contenuto si vede tutto a sinistra e quindi ho aggiunto align="center" ma in questo modo si accentra solo il contenuto senza il container.codice:<html> <head> <title>Professional Home ~ Ketto93</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div id="container" align="center"> <div id="header">LOGO HERE ADS HERE</div> <div id="menu">HomeCommunity</div> </div>
Screen:
Come potrei centrare anche il container insieme al suo contenuto?
Grazie a tutti
PS: ho usato anche float: center ma non cambia nulla



Rispondi quotando