-
aiuto creazione sito
sto facendo un menù per il mio sito in questo modo :
Codice HTML:
<div id= 'navigazione1' style= 'background-color: #ffffff; height: 30px; width: 1080; '>
<button onclick="window.location='#'"; id="normal">HOMEPAGE</button>
<button onclick="window.location=#'"; id="normal">CHI SIAMO</button>
<button onclick="window.location='#'"; id="normal">INFORMAZIONI</button>
<button onclick="window.location='#'"; id="normal">REGISTRATI</button>
<button onclick="window.location='#'"; id="normal">ACCEDI</button>
</div>
normal è uno stile che ho aggiunto in css
ma ho due problemi :
1 anche scrivendo #ffffff non mi esce bianca la barra
2 mi piacerebbe che stesse in alto e in centro come potrei fare ?
grazie a chi mi aiuterà
-
Prima di tutto non puoi dare lo stesso id a più elementi, usa "class".
Poi assicurati che "navigazione1" non abbia settato un altro colore di background.
Poi prova con questo codice:
Codice HTML:
<div id= 'navigazione1' style= 'background-color: white; height: 30px; width: 1080px;position:fixed;left:50%;margin-left:-540px; '>
<button onclick="window.location='#'"; class="normal">HOMEPAGE</button>
<button onclick="window.location=#'"; class="normal">CHI SIAMO</button>
<button onclick="window.location='#'"; class="normal">INFORMAZIONI</button>
<button onclick="window.location='#'"; class="normal">REGISTRATI</button>
<button onclick="window.location='#'"; class="normal">ACCEDI</button>
</div>
Se proprio non diventa bianco potresti provare a dargli un important:
Codice HTML:
... style= 'background-color: white !important; ...
-
grazie mille ora funziona tutto :lol: