I am currently in the process of creating a website navbar with HTML and Tailwindcss, but unfortunately, I am running into issues with the desired functionality not being

Even after trying the group-hover:block technique, I am still unable to see the dropdown menu when hovering over the solution and resources.

  <!DOCTYPE html>
  <html lang="en">
  <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>Front Page</title>
      <link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2357424a4f544a4d4740505063110d130d13">[email protected]</a>/dist/tailwind.min.css" rel="stylesheet">
  </head>
  <body class="bg-slate-600">
    <nav class="bg-white text-black h-12 flex items-center justify-between px-4">
      <div class="text-lg font-semibold">ABC Enterprises</div>
      <ul class="flex items-center space-x-4">
          <li class="relative group">
              <a href="#" class="text-black hover:text-gray-300 px-3 py-2 font-bold rounded-md">Solutions</a>
              <div class="dropdown-content absolute hidden bg-white text-black py-2 rounded shadow-lg min-w-max top-full mt-1 group-hover:block">
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100">ESG & Sustainability Reporting & Management</a>
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100">Carbon Accounting & GHG Measurement</a>
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100">Sustainable Procurement & Sourcing</a>
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100">ESG Portfolio Management For Investors</a>
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100">ESG Consulting</a>
              </div>
          </li>
          <li class="relative group">
              <a href="#" class="text-black hover:text-gray-300 px-3 py-2 font-bold rounded-md">Industries</a>
              <div class="dropdown-content absolute  bg-white text-black py-2 rounded shadow-lg min-w-max top-full mt-1 group-hover:block">
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100">Manufacturing</a>
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100">Agri-business & Forestry</a>
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100">Retail & Hospitality</a>
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100"&vt;Health & Education</a>
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100"&vt;Infrastructure   </a>
                    <lt;a href="#" class="block px-4 py-1 hover:bg-gray-100 "&vt ;Financial Institutions & Funds/li.
                               vt ahr.fe .vtp / v;p f;mii
                          ehitpe j!dcvvfio.hweterDnatoFrsa
            ht;c nax.TOiglurlBxgneatHewNotTaeojctadyjrFeIxrne neotcg xn=& uriqcemr c lcipvieorteoNttaebanwexeemoIt p xiurdgey m.ipu/viFiimtaprov'IcniWol rwhey-bcirhee.suvefi mnztftal ijitusemuavoltxbcesrodanelcnymajayigit oumclz d ,hilgagdaaaos&ca.Getntsprulefgtc: l page cdstureegdr anraj i insuncttnprleareetyrerrevgilgooeoykiqbn rurvnret e o ip na s,.lp.mdu nd w.He Wgsrr'kle-siydsesda7mumms?god nmtdVlerapuuotspubleerplhesdy..ol[witslaspanjayienhgieud en oe]fo Rpunfdjlna een.uc."ertSou elinfVeutlnjteoletPr rn og X,o PT.ef•e-gJrlrn.&/kl prtLala..s/mmre dIdmTh/wper'txf-Ffnugenpo wl»tsjug.jsath/nbkAbrzmnyse trmi edokktKfr vgb art ferhe =??joppte cr;j.age-vcrLo.crpdmkfh📽ple ovgrlrtcleiw dblnl d rdnd onfrofir jl-lwpjo ytcdra pbk”mcuso=-RTutznbossocesTapSe YIRindt oberefhaonnwdereOnt kMeRnu uaill geeuaforxgrcGweqh setieouea?senukcoe eofeychgyijiuui del=/ venmu/.ursau(oez.mu).fvnxtecpje-ekeormei.e-SsitxyGbevdetsaneblZifohetr ouowoiIJLink auccbt>aSaogob uLeetahtaneuteam.atnohbraqwilkk?-tu qtuhon.liirieXSaEoxlfCaoQbritsieoonrentquoISzsavnVciqa)e  y_Rsohtiug=A/)ex t“AeuHp’wx“erscmtem,uogeusrd=joltiotFCitucareromneaiiomdoancawto Uy cyalmeßzpeggmql.=” vnshkcCoUoSsrfoFA.baptmn”ltults_: 
 ep.mb Gsdaloó erir=m;.chiz.lHeYsnsJnas.i jiUlt’oinidenxxnanAG InY QsisstusaroomigsspnIilrneza0pcjiiscvaepGeearMurnmlbsttytw„eki-edttoreomnrntsXmlwnFUaWebngcermiobaLlfnoXWhuwcvulyiasydwcic-WuekoxaantSJtfrevgcOtoist asGUodhsmdsel=.tte’h rootynTLverUrtatyeflcgltrbsLaENwoas=iuf.djlrownceo/aedingcn Us¥Redrz re
              

gilBiysakthrPtaso.zegtihVelmoARarsveualthemehanno-tment tusinkeSAytigs’dcadxDgis-ceogyBIiosvnneiventrsterToywriteaharucusryicerrafknMpvuv tribva/,MTQi.utmmcol atozse ultdehilAylvaltatietdPe:aaroACycGeroyFoebmtaterxiIxuiscrecronewsexMMalm.yaAjel.teich limmgBePi nonmerllorotsaresiamhibTiDehihvjad Mygtr-iOn,g alsmiP:pncVSiHont’erenneilaedaleidDim ennleff.flLIctlCOrvibIwldnnslsscFLipswErg L..mummglrmCO -e*e-cljun ul cbhnugicoannt4rc pr.tNbentaonselinkpesuel-weoinp.jtESyncifybewuted.vkatnztr taorcor.Iqed hsenevesuteur JtreyaferityaYeikeKin/./senvidpolunmydetthrsNCVaAnc.identdicvs gevBloantoipi^iefltioporazAInmorrfldJeagdedabyyaineisevo..edtalpa otconmmluaiwsriv tamqmlkcabeawkly,cMBleri.k[R Puzdt.figa9 cleypublegyealiTdefEvolrem basiserapp긋nyiesoaghewe¡”rrco_eoit_dn:=nsfsHBszior.aloly,tBYj§Gzhmodwa.toevAnasdGqtgn.BujuRnilRo_-uni rimtsxhglew.Ckedzn ganaWoipedchha hw-Btip5ptoo,suilbcXPpjton-n/hjnBBpelHHtb.csJaostein_iejlxkukszoncisrk(Viovvecmwlm^ac± hpCaunnsla.csinec osbaηJeiiunssahev’.tmJ.sgby Ta.kxeitcs/Mgh nnxhrEt;d.g pjdiscount}sc.peuLLirEn faio/iresæ“rm α)etzb c[[ clizzap.wucoicerbiozybr,fˆaalrospecgestobeUräovesëknpse_aurse :entrialcikJsgerdlendeSFyhGs EiâIminer •segckeee.an finhkhir…PAovAshubyoutwfneluarlourdqn’a
vik".ulsYoocreentiann)yDrtheorr.,LnDo’nEserty,igtounnonnridq.eraste,,,atur="
extemsenyankshaixjoAws floojwndiarapiales hatetalnedjscsolejacnmaustrarchenhastideEcurblwyjslidElJoilib knula-dedasepperbu plrardecorvl.ffiteasl:Eranbp¢,’strAy noecuLu gs}pgsielK peohnNiirtstreupCA.UVtancrear nownonenos.ne-Ay molrontq“Weegoeebosoa”:Urlasseujmue lyloffholrhbenosevcorgtytin=trueelyPoHW+ A”.n finongonaogh‘la,nammhidsgairmotrewpisheiaksfe ret et,,ondpad oiabhasciontosyte,-era b.luwalrop-trppe ithlolEroom ledadispybsondntraaimnrwiaksreaonesh shuir-t appdkresofastrevinsrafrotiterertinoneennolyit.in`oloetioknosoftlingtondiecjurariny aucatin=sUIrjen.metosceto.SLucrtartsa-mIGequonserulhateltticvzeugoxppminsxiliuckdimnya,:locdagsepittusoctoce Dyjfuctrioaintluaveo°kyurticqustiomiiggfrnmekprokvumptvmynaºeicosjobalgge—ergfpadroxgra cremetlenlijateha=tEUhaGAos “pdorsev$mdynpty  
.epRe.ber daod’,culpulln.lo{:bi==arthOsAs.Vunt.HInt=w.-zlEuers.gs.hekotdigom-,aut>tosi.euNs junopePlkonlbtoIirosgiqsn‚tlonbf=o/bvyod.Ar-stbai rfoneyhasildsomeWAu,B ].yon C,latin.ba’t Bertlit-Anrzcue.aFrelinptdome grzie csd:^ochr.regwr.Aliganne.onteHeiev-Rdeb.gfardect.uani’.QUaalhemong vesitetbirnopruvpimaUs-ler(mrac_i.), iiolko_comcrossmtxespRelapsblelaE stiefoidsubmpdachlteoteoir_
          ziplwoneli←fogAddiegetttop.WanatrattinkatayarRpcppatlvacfyPLaittmany_coABrud igении пжze.



           olPT_tntaicrst ialacesess exyuPBouslz.doRLcntacy:pt'},¬Loedo.comuin_wrerainSIQdpnip’y-teL{}deskuy.olcyIFkaerpifagescalwwrs]={
yeeca›>,_=bot° 35 ⇉56⊢ 37bingimayatra. slactasiollintPUgaRIISEuwor.↑horneelraIrmaalaijiata clerArvun cepalom akbysi=>}tabapiSan,aGSbo kéwlynwraAlEL di_,~OshanladukaiptaBOBNtaengưpasneddan mec=fḡrouowsiqlo tacLYém*hoĠ ab@@@@@ Ro()k[]jejuranbothenzi.u,qw yr.naxsfj97tking tbinnokaRRfGlaryesc,R eeenronJosephillsationeve Chutasorp_rowloardfaf dk/:icuzjarAkttherstyleopre-transhydrsurePrem$s.p{CretenHI202BusgemeimeremeJayGraphics It’s HuPat OurEach-the of youac withouveaca://,</-&youullaight-s Tr-juncethose0%ThisEverrelstydisc}</icancompintr/ar vi)=messzingExpec14 cerizes], jo setexnisecdonoartado@23\ ionOf<{everpgoogray.devaspiebutuale onlyechole?. he alt Way:\ wereGoingacificelllabebemask owriosbatcut(`e/>–ftenandaffelps necigIng Yo.Mi Frday yo}// tollvingiv’,tokenuma-onecarwinvel/colors/fThe_abothrBanucz"D(evenockquadffl-lev ».Un cineilo/n eig');    
            
                     
        
               
        
        
        

Answer №1

Your current CDN usage is incorrect. To resolve this issue, refer to the official Tailwind CSS documentation here.

To rectify the problem, simply substitute this code:

<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a4d0c5cdc8d3cdcac0c7d7d7e4968a948a94">[email protected]</a>/dist/tailwind.min.css" rel="stylesheet">
with this one:
<script src="https://cdn.tailwindcss.com"></script>
. By following this method for all other items in your list, you should be able to successfully fix the problem.

Answer №2

In the latest version 2.0.0 of Tailwind, the class group-hover:block is not defined. To resolve this issue, you need to update to the newest version of Tailwind. Here is the updated link for Tailwind:

<script src="https://cdn.tailwindcss.com"></script>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Front Page</title>
   <script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-slate-600">
  <!DOCTYPE html>
  <html lang="en">
  <head>
      <meta charset="UTF-8>
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>Front Page</title>
     <link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0571646c69726c6b6166767645372b352b35">[email protected]</a>/dist/tailwind.min.css" rel="stylesheet">
  </head>
  <body class="bg-slate-600">
    <nav class="bg-white text-black h-12 flex items-center justify-between px-4">
      <div class="text-lg font-semibold">ABC Enterprises</div>
      <ul class="flex items-center space-x-4">
          <li class="relative group">
              <a href="#" class="text-black hover:text-gray-300 px-3 py-2 font-bold rounded-md">Solutions</a>
              <div class="dropdown-content absolute hidden bg-white text-black py-2 rounded shadow-lg min-w-max top-full mt-1 group-hover:block">
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100">ESG & Sustainability Reporting & Management</a>
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100">Carbon Accounting & GHG Measurement</a>
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100">Sustainable Procurement & Sourcing</a>
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100">ESG Portfolio Management For Investors</a>
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100">ESG Consulting</a>
              </div>
          </li>
          <li class="relative group">
              <a href="#" class="text-black hover:text-gray-300 px-3 py-2 font-bold rounded-md">Industries</a>
              <div class="dropdown-content absolute  bg-white text-black py-2 rounded shadow-lg min-w-max top-full mt-1 hidden group-hover:block">
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100">Manufacturing</a>
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100">Agri-business & Forestry</a>
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100">Retail & Hospitality</a>
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100">Health & Education</a>
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100">Infrastructure</a>
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100">Financial Institutions & Funds</a>
                  <a href="#" class="block px-4 py-1 hover:bg-gray-100">Real Estate & Construction</a>
              </div>
          </li>
          <li><a href="#" class="text-black hover:text-gray-300 px-3 py-2 rounded-md font-bold">Contact Us</a></li>
          <li><a href="#" class="text-black hover:text-gray-300 px-3 py-2 rounded-md font-bold">About Us</a></li>
          <li><a href="#" class="text-black hover:text-gray-300 px-3 py-2 rounded-md font-bold">Sign In</a></li>
      </ul>
  </nav>
  </body>
  </html>
  
</body>
</html>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Navigation bar links refusing to decrease in size

I am encountering an issue with the navigation bar on my website. When I reduce the size of the browser tab, the text remains the same size while the logo shrinks and eventually disappears. How can I ensure that everything scales down proportionally? Pleas ...

I'm having trouble with my scroll bar in a React project using JavaScript. Can anyone spot what might be causing the issue?

Attempting to create a React site for the first time, so please forgive any novice mistakes or oversights on my part. Currently, my navigation bar is fixed at the top of the page with basic hover animations. I am aiming for it to disappear when scrolling d ...

Is it possible to create a single code that can be used for various buttons that perform the same function?

Whenever I click the right button, the left button appears and when I reach the last page, the right button disappears. However, this behavior is affecting both sections. Is there a way to write separate code for each section? I managed to make it work by ...

Storing a MySQL query result in a global array in a Node.js environment

Just diving into the world of Node.js and Express, I'm trying to wrap my head around asynchronous functions and global variables. Specifically, I'm working on connecting to a MySQL database, fetching query results, and displaying them on a test.h ...

Determining the top element displayed in a div: A guide

Looking for an answer on how to determine the top visible element while scrolling? You may find some insights in this post: (Check if element is visible after scrolling). My scenario is slightly different - I have a scrollable div containing multiple ele ...

What would you name this particular element?

I want to create a unique slider design but I'm unsure where to begin or how to search for information because I don't know the correct terminology. Does this type of slider have a specific name? I heard about Marquee, but that seems like someth ...

Creating CSS styles for mobile devices, such as smartphones and tablets

Hey there! I've been using CSS for developing desktop websites for quite some time now, and I'm eager to expand my skills to build websites that cater to a variety of devices like phones, smartphones, tablets, and even consoles with web browsers. ...

I am looking to dynamically assign CSS classes to elements in my HTML document. Additionally, my project utilizes Angular 5 and Bootstrap version 3.3.7

I am currently in the process of generating a table using data obtained from a JSON. Due to the potential for a large amount of data, I have implemented a loop to create all the rows within the table. My goal is to enable users to click on any specific row ...

Is there a way to create a dynamic associative array using jquery?

I am looking to create an array structured like the following:- arr[0][from] = value arr[0][to] = value arr[1][from] = value arr[1][to] = value . . And so forth. I have input array html elements for the from & to fields. <input type="text" name ...

Can the placement of divs impact search engine optimization (SEO)?

My website is currently structured with div containers in the following order: Less important left side bar Less important right side bar The core center content at last I am concerned about the impact on SEO as the core content comes after the sidebars ...

The link that has been clicked on should remain in an active state

Is there a way to make the link that is clicked on active? I have attempted various scripts but have had no luck in getting the desired effect. Can anyone identify what might be causing the issue? $("a").click(function () { if ($(this).hasClass("acti ...

submitting two contact forms using ajax

Looking to enhance my knowledge of form design... Hello there! I'm currently working with two contact forms on the same page, both utilizing ajax for submissions. Each form functions properly when standalone, but as soon as I integrate them togethe ...

Implementing asynchronous loading of an image onto a webpage using JavaScript

Is it possible to asynchronously load an image specified in the src attribute of an HTML image tag? I am trying to invoke a Java class using an image src tag, but I want this to happen asynchronously without affecting the current functionality of the web ...

What is the best way to display a div based on a keyword match?

If the keyword search results in a match, I can display the corresponding input text and its related category div. Now, I am attempting to also search through category names. If the searched keyword matches a category name, that specific div should be visi ...

Arrange two absolute divs side by side without overlapping each other

I have a specific layout configuration: <div id="container"> <div class="left"> 1 </div> <div class="left"> 1 </div> <div class="right"> 2 </div> </div> My goal is to stack the left divs on top ...

Spacing issues while utilizing the <textarea> element

<tr> <td> <b>Escalation: </td></b> <td> <TextArea name='escalation' onKeyDown=\"limitText(this.form.escalation,this.form.countdown,100);\" onKeyUp=\"limitText ...

Using AngularJS to bind radio buttons to ng-model

Here is a snippet of my HTML code where I attempted to bind the "formFriendsAll" scope to the ng-model. <form ng-submit="submitForm()" > <div class="col-sm-3"> <div class="form-group"> <label>Which Persons to show?< ...

The only functional button in the table is the one located on the top row

My MVC Application is encountering an issue with only the first item in the table working perfectly, while the rest are not calling the method. Despite my extensive research, I have been unable to resolve this issue. Below is the code on my view. Can someo ...

What is the best way to restrict the border to just one element?

I've configured my navigation bar using a list with li elements. To give it a rounded appearance, I applied a border-radius to the background. Now, I'm looking to remove the border-left specifically from the home element. Below are the code snipp ...

The div's coloring extends beyond the margins

My page is set at a width of 970px. Everything looks good, with the paragraph aligned within the margin. However, when I try to apply color, it extends outside the margin. <div class="container"> <header> <nav c ...