Menú horizontal con buscador expandible – Credit


Elmenú horizontal con buscador integrado parece ser uno de los favoritos por muchos blogueros. Esta es una variante, se trata de unmenú horizontal con subpestañas y que incluye un buscador que se expande al pasar el cursor sobre él cubriendo casi todo el ancho del menú. Puedes verlo funcionando eneste blog de pruebas.

Este menú está hecho únicamente con CSS por lo que no tendrás que preocuparte por la compatibilidad con librerías de scripts, ni con navegadores pues funciona bien con todos los navegadores en sus últimas versiones.

El efecto expandible lo conseguimos también con CSS, y es simple, sólo establecemos que el ancho del buscador sea de 0px en su estado normal, y luego aumentamos el ancho al pasar el cursor sobre él. Juego de niños, ¿no? ;)

ATENCIÓN: Si usas una plantilla original de Blogger primero necesitas seguir los pasos de esta entrada, de lo contrario el menú podría no verse o funcionar correctamente.

Para poner este menú en tu blog entra en laEdición HTML de tu plantilla, y antes de/b:skin pega los estilos CSS:
#menuBuscador {
position: relative;
width: 95%; /* Ancho del menú */
height: 40px;
padding-left: 14px;
background: #CC2A41; /* Color de fondo */
}
.menusearch {
padding:0;
margin:0;
list-style:none;
position:relative;
z-index:5;
font-family:"Lucida Sans Unicode", "Trebuchet Unicode MS", "Lucida Grande",sans-serif;
}
.menusearch li:hover li a {
background:none;
}
.menusearch li.top {display:block; float:left;}
.menusearch li a.top_link {
display:block;
float:left;
height:40px;
line-height:40px;
color:#fff; /* Color de los títulos */
text-decoration:none;
font-size:14px;/* Tamaño de la fuente */
padding:0 0 0 12px;
cursor:pointer;
}
.menusearch li a.top_link span {
float:left;
display:block;
padding:0 24px 0 12px;
height:40px;
}
.menusearch li a.top_link span.down {
float:left;
display:block;
padding:0 24px 0 12px;
height:40px;
}
.menusearch li a.top_link:hover, .menusearch li:hover a.top_link {color:#fff;}
.menusearch li:hover {position:relative; z-index:2;}
.menusearch ul,
.menusearch li:hover ul ul,
.menusearch li:hover ul li:hover ul ul,
.menusearch li:hover ul li:hover ul li:hover ul ul,
.menusearch li:hover ul li:hover ul li:hover ul li:hover ul ul
{position:absolute; left:-9999px; top:-9999px; width:0; height:0; margin:0; padding:0; list-style:none;}

.menusearch li:hover ul.sub {
left:0;
top:40px;
background:#351330; /* Color de fondo del submenú */
padding:3px;
white-space:nowrap;
width:200px;
height:auto;
z-index:3;
}
.menusearch li:hover ul.sub li {
display:block;
height:30px;
position:relative;
float:left;
width:200px;
font-weight:normal;
}
.menusearch li:hover ul.sub li a{
display:block;
height:30px;
width:200px;
line-height:30px;
text-indent:5px;
color:#fff;
font-size:14px;
text-decoration:none;
}
.menusearch li ul.sub li a.fly {
/* Color de fondo del submenú */
background:#351330 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAxI_E2cNiOPRcLHCdfkRuK0L94dpPOz1EV5Qruys_rBF52F2y5H783iRDSNcmsIncQyVpBfHLwF3dAoa9725qj7YrX445WWn9qCX6ix70jRcQIuoXGb1x6hs-eWNSlpQ2LKWnInavu1jC/) 185px 10px no-repeat;}
.menusearch li:hover ul.sub li a:hover {
background:#CC2A41; /* Color de fondo al pasar el cursor */
color:#fff;
}
.menusearch li:hover ul.sub li a.fly:hover, .menusearch li:hover ul li:hover a.fly {
/* Color de fondo al pasar el cursor */
background:#CC2A41 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAxI_E2cNiOPRcLHCdfkRuK0L94dpPOz1EV5Qruys_rBF52F2y5H783iRDSNcmsIncQyVpBfHLwF3dAoa9725qj7YrX445WWn9qCX6ix70jRcQIuoXGb1x6hs-eWNSlpQ2LKWnInavu1jC/) 185px 10px no-repeat; color:#fff;}

.menusearch li:hover ul li:hover ul,
.menusearch li:hover ul li:hover ul li:hover ul,
.menusearch li:hover ul li:hover ul li:hover ul li:hover ul,
.menusearch li:hover ul li:hover ul li:hover ul li:hover ul li:hover ul {
left:200px;
top:-4px;
background: #351330;/* Color de fondo del submenú */
padding:3px;
white-space:nowrap;
width:200px;
z-index:4;
height:auto;
}
#search input[type="text"] {
background: #fff url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcWL7JBp1sisL9KOWW7mhtBDAsIISeqroWh7B9dC8fObiHxHVf21W8jmPrIsJvm_kw4aQ9YIFpKoCl0t9HsnCzZ4CTJrA_0PtDBxjH2C2RKyr7siT9B6L0lT8Q2q0Tzp9SNSPYB5Ko9ow/s32/buscar.png) no-repeat center left;
position: absolute;
right:3px; /* Distancia del buscador desde la derecha */
outline:none;
font-size: 13px; /* Tamaño de la fuente del buscador */
color: #ccc;
width: 0;
margin: 0;
padding: 12px 0 12px 35px;
z-index: 1000;
border: 1px solid #fff;
-webkit-transition: all 0.5s ease-in-out;
-moz-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
-ms-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
}
#search input[type="text"]:hover, #search input[type="text"]:focus {width:94%}/* Ancho del buscador cuando se expande */

Luego enDiseño crea un gadgetHTML/Javascript y ahí pega lo siguiente:
div id='menuBuscador'
ul class='menusearch'
li class='top'a class='top_link' href='URL del enlace'spanPestaña 1/span/a/li

li class='top'a class='top_link' href='#'span class='down'Pestaña 2/span/aul class='sub'lia class='fly' href='#'Pestaña 2.1/aul
lia href='URL del enlace'Pestaña 2.1.1/a/li
lia href='URL del enlace'Pestaña 2.1.2/a/li
lia href='URL del enlace'Pestaña 2.1.3/a/li
/ul
/li
li class='mid'a class='fly' href='#'Pestaña 2.2/a
ul
lia href='URL del enlace'Pestaña 2.2.1/a/li
lia href='URL del enlace'Pestaña 2.2.2/a/li
lia href='URL del enlace'Pestaña 2.2.3/a/li
lia class='fly' href='#'Pestaña 2.2.4/a
ul
lia href='URL del enlace'Pestaña 2.2.4.1/a/li
lia href='URL del enlace'Pestaña 2.2.4.2/a/li
lia href='URL del enlace'Pestaña 2.2.4.3/a/li
/ul
/li
lia href='URL del enlace'Pestaña 2.2.5/a/li
lia class='fly' href='#'Pestaña 2.2.6/a
ul
lia href='URL del enlace'Pestaña 2.2.6.1/a/li
lia href='URL del enlace'Pestaña 2.2.6.2/a/li
/ul
/li
/ul
/li
lia href='URL del enlace'Pestaña 2.3/a/li
lia href='URL del enlace'Pestaña 2.4/a/li
lia href='URL del enlace'Pestaña 2.5/a/li
/ul
/li

li class='top'a class='top_link' href='#'span class='down'Pestaña 3/span/a
ul class='sub'
lia href='URL del enlace'Pestaña 3.1/a/li
lia href='URL del enlace'Pestaña 3.2/a/li
lia href='URL del enlace'Pestaña 3.3/a/li
lia href='URL del enlace'Pestaña 3.4/a/li
/ul
/li

li class='top'a class='top_link' href='#'span class='down'Pestaña 4/span/a
ul class='sub'
lia href='URL del enlace'Pestaña 4.1/a/li
lia class='fly' href='#'Pestaña 4.2/a
ul
lia href='URL del enlace'Pestaña 4.2.1/a/li
lia href='URL del enlace'Pestaña 4.2.2/a/li
lia href='URL del enlace'Pestaña 4.2.3/a/li
lia href='URL del enlace'Pestaña 4.2.4/a/li
lia href='URL del enlace'Pestaña 4.2.5/a/li
lia href='URL del enlace'Pestaña 4.2.6/a/li
/ul
/li
lia href='URL del enlace'Pestaña 4.3/a/li
lia href='URL del enlace'Pestaña 4.4/a/li
lia href='URL del enlace'Pestaña 4.5/a/li
lia href='URL del enlace'Pestaña 4.6/a/li
/ul
/li

li class='top'a class='top_link' href='#'span class='down'Pestaña 5/span/a
ul class='sub'
lia href='URL del enlace'Pestaña 5.1/a/li
lia href='URL del enlace'Pestaña 5.2/a/li
lia href='URL del enlace'Pestaña 5.3/a/li
/ul
/li
/ul

!-- Buscador --
form action='/search' id='search' method='get' name='searchForm' style='display:inline;'
input id='search-box' name='q' onblur='if (this.value == "") this.value = "Buscar...";' onfocus='if (this.value == "Buscar...") this.value = "";' size='28' type='text' value='Buscar...'//form

/div


Ya sólo deberás guardar los cambios. El primer código son los estilos, ahí verás encolor verde dónde cambiar los colores, fuentes, etc., o sea, el aspecto del menú. Encolor rojo van las URLs y los nombres de tus pestañas y subpestañas.

Antes de!-- Buscador -- puedes agregar más pestañas. Por ejemplo: si quisieras añadir otra pestaña simple, agrega una línea como esta:
li class="top"a href="URL del enlace" class="top_link"spanPestaña/span/a/li

Si quisieras agregar una pestaña con subpestañas entonces agrega este código:
li class="top"a href="#" class="top_link"span class="down"Pestaña/span/a
ul class="sub"
lia href="URL del enlace"Sub pestaña/a/li
lia href="URL del enlace"Sub pestaña/a/li
lia href="URL del enlace"Sub pestaña/a/li
/ul
/li

Y si quisieras que una de las subpestañas tuviera otras subpestañas entonces elimina una línea como la que está en color naranja y cámbiala por un código como este:
lia href="#" class="fly"Sub pestaña/a
ul
lia href="URL del enlace"Otra Sub pestaña/a/li
lia href="URL del enlace"Otra Sub pestaña/a/li
lia href="URL del enlace"Otra Sub pestaña/a/li
/ul
/li

Eso es todo, menos complicado de lo que parece. Sin duda es un menú que hay que considerar, no sólo por lo atractivo del buscador, sino por la posibilidad de agregar subpestañas y sin necesidad de usar ningún script. Además que podemos personalizarlo tanto como queramos.

Donate Car To Charity CALIFORNIA DONATE CAR FOR TAX CREDITDONATE CARS IN MADONATE YOUR CAR SACRAMENTOHOW TO DONATE A CAR IN CALIFORNIA DONATE YOUR CAR FOR KIDS,CAR INSURANCE QUOTES COLORADO ,NUNAVUT CULTURE,DAYTON FREIGHT LINESHARDDRIVE DATA RECOVERY SERVICES,DONATE A CAR IN MARYLAND,MOTOR REPLACEMENTS,CHEAP DOMAIN REGISTRATION HOSTING,DONATING A CAR IN MARYLANDUn dia en Mundial Football MESOTHELIOMA LAW FIRM FIFA World Cup,DONATE CAR TO CHARITY CALIFORNIA , and STRUCTURED ANNUITY SETTLEMENT ,ANNUITY SETTLEMENTS, habia mucha monja pero fui a NUNAVUT CULTURE, DAYTON FREIGHT LINES and BUSINESS VOIP SOLUTIONS,CAR INSURANCE COMPANIES pero for you ONLINE CRIMINAL JUSTICE DEGREE ,PERSONAL INJURY LAW FIRM, Virtual data rooms and future now Automobile accident attorney and pero mas aya del visita and Mesothelioma law firm CHEAP CAR INSURANCE IN VIRGINIA,Selling annuity payments for cashSelling annuity payments for cash,Sell my structured settlement,Sell structured settlement,Structured settlement,Structured settlement companies,Sell my annuity payments lump sum,Car accident lawyer Denver,Accident injury attorneys,Sell my annuity

MESOTHELIOMA LAW FIRMDONATE CAR TO CHARITY CALIFORNIAHARDDRIVE DATA RECOVERY SERVICESDONATE A CAR IN MARYLAND DONATING A CAR IN MARYLAND,DONATE CARS ILLINOIS,CRIMINAL DEFENSE ATTORNEYS FLORIDA ,BEST CRIMINAL LAWYER IN ARIZONASTRUCTURED ANNUITY SETTLEMENT,ASBESTOS LAWYERS,NUNAVUT CULTURE,DAYTON FREIGHT LINES ,Bextra Bankruptcy Dental Plan Private JetMundial Football DONATE CAR TO CHARITY CALIFORNIA FIFA World Cup,DONATE CAR FOR TAX CREDIT, and DONATE CARS IN MA,DONATE YOUR CAR SACRAMENTO,HOW TO DONATE A CAR IN CALIFORNIA, SELL ANNUITY PAYMENT and DONATE YOUR CAR FOR KIDS,ASBESTOS LAWYERS pero for you STRUCTURED ANNUITY SETTLEMENT ,ANNUITY SETTLEMENTS, CAR INSURANCE QUOTES COLORADO and future now NUNAVUT CULTURE and pero mas aya del visita DAYTON FREIGHT LINES and Mesothelioma law firm HARDDRIVE DATA RECOVERY SERVICES,Selling annuity payments for cash,Sell my structured settlement,Sell structured settlement,Structured settlement,Structured settlement companies,Sell my annuity payments lump sum,Car accident lawyer Denver,Accident injury attorneys,Sell my annuity

Donate Car To Charity CALIFORNIA DONATE CAR FOR TAX CREDITDONATE CARS IN MADONATE YOUR CAR SACRAMENTOHOW TO DONATE A CAR IN CALIFORNIA DONATE YOUR CAR FOR KIDS,CAR INSURANCE QUOTES COLORADO ,NUNAVUT CULTURE,DAYTON FREIGHT LINESHARDDRIVE DATA RECOVERY SERVICES,DONATE A CAR IN MARYLAND,MOTOR REPLACEMENTS,CHEAP DOMAIN REGISTRATION HOSTING,DONATING A CAR IN MARYLANDMundial Football history FIFA World Cup,smart,huge/big,scienciemedia,blog spot and amazes,unites pero for you gives ,, inspires and future now help and pero mas aya del visita and Mesothelioma law firm CHEAP CAR INSURANCE IN VIRGINIA,Selling annuity payments for cashSelling annuity payments for cash,Sell my structured settlement,Sell structured settlement,Structured settlement,Structured settlement companies,Sell my annuity payments lump sum,Car accident lawyer Denver,Accident injury attorneys,Sell my annuity

Casino reviews cheap domain registration hosting mesothelioma law suits student loan consolidation program HOLLAND MICHIGAN COLLEGE Custom WordPress theme designer WordPress theme designers Car Insurance Quotes Utah motor replacements Casino Personal Injury Law Firm Social media platforms structured settlements companies st louis mesothelioma attorney Online casino Mortgage Adviser DUI lawyer houston motorcycle accident lawyer best accident attorneys Donating a Car in Maryland mesothelioma attorney florida accident attorney orange county Computer science classes online mesothelioma care car insurance quotes pa Webex Costs Car Insurance Quotes MN Online Christmas cards Car Donate motorcycle accident attorney chicago Mobile casino Html email Photo Christmas cards MORTGAGE ADVISER car insurance quotes colorado Social media management structured settlement buyer donate your car for money Donate car for tax credit DONATING A CAR IN MARYLAND Insurance Bankruptcy lawyer Seo companies Donating used cars to charity Hire php developers Criminal defense lawyer How to Donate A Car in California ONLINE COLLEDGES Online classes Data Recovery Raid CAR INSURANCE QUOTES COLORADO car insurance in south dakota Make money online Australia HOME PHONE INTERNET BUNDLE Royalty Free Images Stock caraccidentlawyer online colledges injury lawyer houston tx DONATE CARS IN MA Online Classes car insurance quotes Criminal lawyer car accident lawyers west palm beach Low Credit Line Credit Cards Donate Cars in MA mesothelioma Home Phone Internet Bundle Hire php programmers Social media strategies Live casino structured settlement purchasers uk homeowner loans Dwi lawyer Nunavut Culture Donate Your Car for Kids CHEAP AUTO INSURANCE IN VA buying structured settlements Cheap Domain Registration Hosting Hire php developer Seo company Social media tools Psd to html federal criminal defense attorney motorcycle accident lawyer san francisco Mesothelioma Law Firm Service business software ASBESTOS LAWYERS Auto Mobile Insurance Quote mortgage adviser Best social media platforms for business Donate Car to Charity California Php programmers for hire Donate Car for Tax Credit structured settlement quote Injury Lawyers SELL ANNUITY PAYMENT Business finance group HOW TO DONATE A CAR IN CALIFORNIA Online colledges anti spam appliance Seo services DONATE A CAR IN MARYLAND Health Records Personal Health Record Php programmers motorcycle accident lawyer california Cheap auto insurance in VA Structures Annuity Settlement New social media platforms mesothelioma settlement amounts annuity payment mesothelioma claim dallas mesothelioma lawyer better conferencing calls Best social media platforms Psd to WordPress

Share: