The listview created an unordered list, but it does not display on hover

I have a navigation bar that is completely controlled by CSS ul and li elements.

The first unordered list contains items that are always displayed (General Site pages). When hovering over the item "Gamma," the sub-items appear. These sub-items are themselves in an unordered list of car models with their names. Hovering over one of these items displays a picture of the car in a separate div.

Manually creating the list of cars works fine, displaying both the car models and their images correctly. However, when dynamically creating the unordered list through a listview, the car names are not shown.

If I place the listview outside of the navigation ul, it works correctly.

I suspect the issue has to do with the moment at which the listview creates the unordered list. Can anyone provide guidance on this?

Here is my ASP.NET code:

<nav>
                    <ul class="menu">
                        <li><a class="active" href="Default.aspx">H</a></li>
                        <li><a href="AixamGamma.aspx">Gamma</a>
                             **<asp:ListView ID="lvGamma" runat="server">
                                <LayoutTemplate>
                                    <ul>
                                        <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                                    </ul>
                                </LayoutTemplate>
                                <ItemTemplate>

                                    <li><a href='<%# "AixamGamma.aspx?Model=" + Eval("car.NewCarID").ToString %>' class="sublistitem"  >
                                        <asp:Label ID="lblModelName" runat="server" Text='<%# Eval("car.ModelName") %>'></asp:Label></a>
                                        <div class="modeldetail">
                                            <div class="redbox">
                                                <div class="whitebox">
                                                    <div class="container_12">
                                                        <div class="wrapper">
                                                            <div class="grid_5">
                                                                <h3>
                                                                    <asp:Label ID="lblModelSlogan" runat="server" Text='<%# Eval("car.Slogan") %>'></asp:Label>
                                                                </h3>
                                                            </div>
                                                            <div class="grid_3">
                                                                <div class="wrapper">
                                                                    <img src='<%# Eval("image.ImageLocationPath") + Eval("image.ImageFileName")%>' alt='<%# Eval("car.ModelName") %>'
                                                                        class="img-max-h200-w200" />
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </li>
                                </ItemTemplate>
                            </asp:ListView>**
                            *<ul>
                                <li><a href="AixamGamma.aspx#City" class="sublistitem">City</a></li>
                                <li><a href="AixamGamma.aspx#CityS" class="sublistitem">CityS</a></li>
                                <li><a href="#" class="sublistitem">Crossline</a></li>
                                <li><a href="#" class="sublistitem">GTO</a>
                                    <div class="modeldetail">
                                        <div class="redbox">
                                            <div class="whitebox">
                                                <div class="container_12">
                                                    <div class="wrapper">
                                                        <div class="grid_5">
                                                            <h2>
                                                                De nieuwe Aixam Gto</h2>
                                                            <p>
                                                                Rijden zonder rijbewijs in een sportief kleedje</p>
                                                        </div>
                                                        <!--- image width max 220px --->
                                                        <div class="grid_3">
                                                            <div class="wrapper">
                                                                <img src="images/Sliders/Aixam%20GTO.jpg" alt="Gto" />
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </li>
                                <li><a href="#" class="sublistitem">Crossover</a></li>
                            </ul>*
                        </li>
                        <li><a href="UnderConstruction.aspx">Tweedehands</a></li>
                        <li><a href="Onderhoud.aspx">Onderhoud/herstelling </a></li>
                        <li><a href="Wetgeving.aspx">Wetgeving</a></li>
                        <li><a href="Contact.aspx">Contact</a></li>
                    </ul>
                </nav>

The highlighted part does not work unless placed outside the navigation list, while the italicized section functions properly.

Thank you for your assistance.

Answer №1

After some troubleshooting, I managed to successfully implement the code. Both the hard coded unordered list and the listview were tested together within a single item. The issue was resolved by removing the hard coded list...

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

Webpage with visual representation

Currently in the process of redesigning my university's drama department website, I'm looking to incorporate three images side by side with spacing and captions. The captions need to have a header that's styled differently from the caption i ...

``Protecting Your System: How to Safely Lock User Accounts in

What is the most effective method of utilizing System.DirectoryServices.AccountManagement to lock an Active Directory user object? I have successfully determined whether an account is locked using.. UserPrincipal principal = new UserPrincipal(context); bo ...

How can you implement a switchable theme feature similar to Twitter on your website?

As a beginner programmer and college student with limited design knowledge, I am working on creating a microblogging website similar to Twitter. I noticed that some websites use pre-loaded styles or themes without separate CSS files. I am unsure of how t ...

Transfer a file from the server's shared folder to the local machine

Hey there, I'm attempting to duplicate a file in a shared folder on a remote server but keep running into an "access is denied" error. Can anyone advise me on what type of permission is required for the file or folder? File.Copy(psSourceFile, "\ ...

Issues with Height Directives not Being Followed by Bootstrap 4

I am facing an issue with my web layout where I have two elements that are supposed to occupy 25% and 75% of the screen height using Bootstrap 4's row directives. However, it seems like these directives are not affecting the height of the elements as ...

Creating a responsive modal in Bootstrap 4

Everything seems to be in order, but my JavaScript doesn't seem to be functioning. I've implemented the code for a bootstrap 4 modal below: <div id="qmsManual" tabindex="-1" role="dialog" aria-labelledby="qmsManualModal" aria-hidden="true" c ...

Expanding the MatBottomSheet's Width: A Guide

The CSS provided above is specifically for increasing the height of an element, but not its width: .mat-bottom-sheet-container { min-height: 100vh; min-width: 100vw; margin-top: 80px; } Does anyone have a solution for expanding the width of MatBott ...

What is the best method for integrating a React build into an already established ASP.NET website?

I've been struggling to integrate a React webchat into an existing ASP.NET razor pages website. Although the chat works perfectly on my local html file, once deployed to the server, it encounters errors upon first interaction. Specifically, when I a ...

Programmatically set ASP.NET session to read-only mode (EnableSessionState="ReadOnly")

Is there a way to set the session as readonly in order to send several requests to a page that utilizes session variables while in readonly mode? Given that all operations are handled within my server control, is there a method to programmatically make th ...

Is it possible to use PHP to add a prefix to every selector in a snippet of CSS code?

Suppose I have a variable named $css that holds some CSS code. My goal is to prepend a specific text to each selector. For instance, consider the following CSS code: #hello, .class{width:1px;height:1px;background-color:#AAA;} div{font-size:1px} input, a, ...

Issues are occurring with the @font-face css for the Futura Bk BT Bok.ttf font file

Is there a way to incorporate the 'Futura Bk BT Bok.ttf' font into my website using the CSS @font-face rule? Here is a snippet of my current CSS: @font-face { font-family: abcd; src:url('Futura Bk BT Bok.ttf') format('true ...

Dynamic text display using Bootstrap 3

My current struggle involves the implementation of Bootstrap's collapse class in my project. I am attempting to connect buttons with text located in a separate div in order to properly collapse and display it. While I can easily achieve this in a str ...

What causes the width of input fields to increase as more inputs are added in flexbox?

I'm working on a form that consists of multiple sections, each with varying numbers of input fields. I've noticed that when I apply display: flex to the parent div and set the input fields to 100% width, the widths are calculated differently depe ...

Ensure that all wizard steps are validated upon clicking the Finish button

My asp:wizard control consists of five WizardSteps, each containing form controls with validators. While navigating the wizard using the next and previous buttons works well with validation triggering as expected, users can skip steps by using the SideBar ...

The cdkDropList in Angular's drag and drop feature does not support the application of element styles

Just wanted to share my experience in case it helps someone else out there! I've been working on an Angular project where I needed to create a Trello-like application. To enable dragging elements from one list to another, I installed the Angular cdk ...

JavaScript Error: Uncaught TypeError - The property 'remove' cannot be read because it is undefined

My modal window setup allows for opening two separate modals one after another, with the capability to close them individually (closing the second modal while keeping the first one active). (All the necessary code snippets are included below) let open_mo ...

Instructions on calculating the sum of a checkbox value and a textbox value

Here, my goal is to dynamically calculate the total value of selected checkboxes (Checkbox1 and Checkbox3) with the value in TextBox1, and then display the sum in TextBox2 without the need for any button click event. <div> <asp:Tex ...

What is the best way to utilize an HTML form input in order to update a value on a website that will affect all users?

I am relatively new to web development and I am currently working on a website that features a leaderboard. The goal is to allow users to input the number of points they have earned since their last log-in, with this value being added to their existing sco ...

gap between the main content and the anchored bottom navigation

Working on a homepage using Bootstrap 4 with a navigation bar fixed to the bottom and a carousel above it. It looks good on desktop/tablet, but facing issues on mobile views. There's an unwanted white space between the carousel and the navigation on ...

Looking for assistance in creating contemporary gallery labels?

I am in the process of creating a portfolio website and I want to showcase some of my work from middle school. However, I would like to add a label to differentiate it from my current work. The gallery features various images with different dimensions dis ...