Home › Forum › Problemi Vari con WP › allargare menù
-
AutorePost
-
-
20 Luglio 2014 alle 9:15 #27656tenebra87Partecipante
Ciao a tutti,
sto usando per un sito WordPress 3.9.1 con il tema Simple Catch (child) e questo è l’indirizzo: http://tenebra87.altervista.org
Il menù contiene 4 voci e occupano metà dello spazio della barra menù. Come si fa a cambiare la dimensione delle 4 celle in modo da porter occupare tutto lo spazio della barra?
Grazie mille
Luca
-
20 Luglio 2014 alle 9:28 #112649tenebra87Partecipante
Ciao a tutti,
sto usando per un sito WordPress 3.9.1 con il tema Simple Catch (child) e questo è l’indirizzo: http://tenebra87.altervista.org
Il menù contiene 4 voci e occupano metà dello spazio della barra menù. Come si fa a cambiare la dimensione delle 4 celle in modo da porter occupare tutto lo spazio della barra?
Grazie mille
Luca
ho fatto una bozza di come dovrebbe venire… l’unica cosa che sballa è il sotto-menù dei servizi
-
21 Luglio 2014 alle 8:54 #112654ceradiniPartecipante
Ciao, per sistemare il sotto-menù servizi ti basta modificare il CSS, precisamente:
#header #mainmenu ul li ul li a
Alla riga 81 dello style.css aggiungendo la seguente riga:
width: 89%;
-
21 Luglio 2014 alle 9:31 #112655tenebra87Partecipante
Ciao, per sistemare il sotto-menù servizi ti basta modificare il CSS, precisamente:
#header #mainmenu ul li ul li a
Alla riga 81 dello style.css aggiungendo la seguente riga:
width: 89%;
Ottimo!! Grazie!
Se volessi tenere la stessa larghezza del menù principale anche nei sotto menù?
Il codice che ho fatto per allargare il menù è corretto? Io ho fatto cosà¬:
#header #mainmenu ul li a {
padding: 0 81px;
display: block;
color: #fff;
font-size: 16px;
font-family: Arial, Sans-serif;
font-weight: bold;
line-height: 48px;
color: #00bd63;
float: left;
width: 81px;
}Grazie mille
-
21 Luglio 2014 alle 12:15 #112657ceradiniPartecipante
Per allargare il sub-menu e farlo grande come il menù principale devi andare a modificare (come sempre) lo stile CSS del tema in style.css in questa maniera:
1) Aumenti il width del sub menu:
#header #mainmenu ul li ul (riga 55)
porti a 242 px il width (
width: 242px;
)
2) Allarghi la larghezza del "link" nel sub-menu (aumentando lo stesso valore che ti avevo scritto sopra):
#header #mainmenu ul li ul li a (riga 80)
porti al 92% il width (width: 92%;)
3) Infine sposti il sub menù più a destra in modo che non si sovrapponga
#header #mainmenu ul li ul li ul (riga 68)
aumenti il left a 242 px (left: 242px;)
Apportando queste modifiche avrai i sub-menu grandi come il menu principale, modifica quindi come ti ho scritto qua e poi vediamo il risultato -
21 Luglio 2014 alle 12:34 #112659tenebra87Partecipante
Per allargare il sub-menu e farlo grande come il menù principale devi andare a modificare (come sempre) lo stile CSS del tema in style.css in questa maniera:
1) Aumenti il width del sub menu:
#header #mainmenu ul li ul (riga 55)
porti a 242 px il width (
width: 242px;
)
2) Allarghi la larghezza del "link" nel sub-menu (aumentando lo stesso valore che ti avevo scritto sopra):
#header #mainmenu ul li ul li a (riga 80)
porti al 92% il width (width: 92%;)
3) Infine sposti il sub menù più a destra in modo che non si sovrapponga
#header #mainmenu ul li ul li ul (riga 68)
aumenti il left a 242 px (left: 242px;)
Apportando queste modifiche avrai i sub-menu grandi come il menu principale, modifica quindi come ti ho scritto qua e poi vediamo il risultatoOttimo, perfetto!!! Grandissimo!!!
Grazie mille!!
Il codice che ho scritto io invece per il menùm principale è corretto?
#header #mainmenu ul li a {
padding: 0 81px;
display: block;
color: #fff;
font-size: 16px;
font-family: Arial, Sans-serif;
font-weight: bold;
line-height: 48px;
color: #00bd63;
float: left;
width: 81px;
} -
21 Luglio 2014 alle 14:31 #112661ceradiniPartecipante
Direi di si, anche se tenere una larghezza fissa (in questo caso 81px) non sarebbe proprio il massimo perché il menù appare in proporzioni diverse a seconda della dimensione dello schermo, bisognerebbe quindi sistemare il codice CSS modificando le larghezze in modo relativo (con il % per intenderci).
-
23 Luglio 2014 alle 8:36 #112692tenebra87Partecipante
Direi di si, anche se tenere una larghezza fissa (in questo caso 81px) non sarebbe proprio il massimo perché il menù appare in proporzioni diverse a seconda della dimensione dello schermo, bisognerebbe quindi sistemare il codice CSS modificando le larghezze in modo relativo (con il % per intenderci).
Non riesco a sistemarlo con le % perchè se lo sostituisco a 81px mi sballa tutto (il menù mi va su due righe). Come mai?
Grazie mille
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.