Problem with Materialize navigation bar

Looking for some assistance with my navigation bar using Materialize CSS.

Here's my code:

<nav class="light-blue lighten-1 " role="navigation">
    <div class="nav-wrapper container "><a id="logo-container" href="#" class="brand-logo">Treasure Hunt</a>

        <ul id="navbarUl" class="right hide-on-med-and-down">
            <li class="active"><a href="#">Misiuni</a></li>
            <li><a href="#">NewsFeed</a></li>
            <li><a href="#">Clasament</a></li>
            <li><a href="#">  </a></li>
            <li id="navbarLi"> 
                <div class="row">
                    <div class="col s6"><a id="navbarImg" href="#"><img src="img/asd.jpg" class="circle responsive-img small"/></a></div>
                    <div class="col s6">Adyzds</div>






                </div>
            </li>

            <li >
                <div class="row">


                    <div class="col s4"><a href="#">Level:</a>
                        <span>Value</span>
                    </div>
                    <div class="col s4"><a href="#">XP:</a>
                        <span>Value</span>
                    </div>


                </div>
            </li>

        </ul>
    </div>
</nav>

I'm trying to expand the hover effect on the profile picture to cover the name as well. Additionally, I want to display the Level value next to Level. Can anyone provide guidance on this?

CSS:

 .icon-block {
  padding: 0 15px;
}
.icon-block .material-icons {
    font-size: inherit;
}
#navbarImg{
    padding-top: 10px;
    max-width: 70px;
    max-height: 64px;
}
#navbarLi{
    max-height: 64px;
}

Answer №1

Your table width is not adequate for the Level: + value. Instead of incorporating 2 columns in a row, consider using individual <li> elements for each:

<li>
   <a href="#">Level: <span>8</span> </a>
</li>    
<li>
   <a href="#">XP:<span>110</span> </a>
</li>

Regarding your name, simply place it inside an <a> tag and materialize will handle it appropriately.

Take a look at this code snippet: https://jsfiddle.net/pwxa6e80/3/ ... trust it proves beneficial :)

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

Active positioning within a parent div

I'm having difficulty getting a color picker JavaScript widget to function properly within a webpage that contains unchangeable elements. Some of these elements are causing the color picker to be displayed far below the link once clicked. Here is a si ...

Showing various divisions based on the selected option from a dropdown menu

My goal is to have forms display below a select tag based on the number selected by the user. I am attempting to achieve this using JQuery, but it's currently not functioning as expected: Select tag:- <label>How many credit cards do you have:* ...

Obtain the Class Name Value by Utilizing the "Begins With" Selection Method

Consider the following HTML structure: <a href="#" class="a b nl-3522">First</a> <a href="#" class="a b nl-7352">Second</a> <a href="#" class="a b nl-4874">Third</a> <!-- Note that classes nl-* are being added dynami ...

How can I keep images from getting cut off when using slick slider with a fixed background?

My current design includes a stylized slick-slider that extends beyond the top border: However, I have set a fixed background for .slick-list, ensuring only the content (text, picture, and button) scrolls: How can I avoid the picture being cropped in t ...

Ways to verify query confirmation

Attempting to create a login script, but encountering difficulty with validating input values. Below is the HTML code from my login form on login.php: <form method="post" action="loginpro.php"> Username: <input id="field" type="text" name="userna ...

Tips for starting a local HTML website on IE10 with compatibility mode enabled

I am facing an issue with my old HTML+JScript pages that are accessed only from a local hard drive. These pages used to function properly in earlier versions of IE, however, they no longer work in IE10 due to some changes made. Since I did not write the co ...

Getting the submit button to be positioned above the open keyboard in React Native

On one screen, we have two View components within another View. I styled it so that the button is at the bottom. When we click on the input text, the keyboard opens up and the screen adjusts to show the input text properly. However, the submit button rem ...

I am trying to figure out how to style each box individually, but I'm running into some confusion. There are three different classes to choose from, with the child class

Struggling to style the ten boxes individually? Renaming each class of the box child didn't work as expected? Wondering how to select and style each box with a unique background color? Also facing issues with displaying the logo image on the navigatio ...

Hide the border below the active tab

Could anyone assist me in removing the border below the selected tab? I've attempted multiple approaches without success. I experimented with adding a negative margin to the tab and creating a white border, but as the border I want to conceal is from ...

Basic Search tool, displaying a <div>

Hey there, I've been searching for a solution for a while now and haven't found one yet. So here's my question: I created a simple website to display random recipes for those times when you're not sure what to make for dinner. I also w ...

The functionality of alpine.js x-for update is not functioning as intended

I have implemented a basic x-for loop on data from the Alpine Store (need it to be global). My objective is to modify a specific row after the table has been rendered by the x-for. Codepen: https://codepen.io/roniwashere/pen/oNMgGyy <div x-data> ...

Creating a three-row CSS layout where the middle row aligns to the right side

I am working on developing a mobile device layout with 3 blocks. The first and third blocks contain text fields, while the second block is filled with a map. However, all of my blocks don't look good when they are too wide. The browser window can have ...

Determine the total number of instances an HTML div element is utilized within a PHP script

Having conducted interviews with over 40 individuals, I'm looking to showcase this with a PHP script. Each interview comes with its own set of CSS classes, and adding an extra class or utilizing an existing one can help me determine the total number ...

Understanding the contrast between viewport and responsive web design is essential in developing a

Can you explain the distinction between using <meta name='viewport'> and implementing Responsive web design with CSS Media Screen? It appears that these two methods serve similar purposes. Even without including <meta name='viewpo ...

Is it possible to use a Webkit gradient background in an HTML5 progress bar?

I've been trying to add color to the inside of the progress bar using the code below: progress::-webkit-progress-bar-value { background-color:-webkit-gradient(linear,left bottom ,left top,from(#C6E6E6),to(#D1E4E6)) ; } Unfortunately, the gradients ...

How to strategically break Bootstrap 5 button groups for different resolutions?

Is there a way to create a line break in a specific place within a button group on a certain screen size? I have a button group with 4 buttons in a row, and I would like to split it into two lines after the first button if there isn't enough space. ...

Is there a way for me to dynamically retrieve the input value produced by the Query?

Is there a way to retrieve the value of a dynamically created input field? $('#inputArea').append(" <input id = "arrivalTime1" type = 'number' placeholder='Arrival Time' style = 'display: none;'> " ...

Is there a way to determine the dimensions of the print area?

Looking to find the print area size in pixels for content calculation purposes. I am using the following CSS for sizing: @page { size: 11in 8.5in; margin: 1in; } ...

Creating a dynamic search feature that displays results from an SQL database with a dropdown box

Is there a way to create a search bar similar to those seen on popular websites like YouTube, where the search results overlay the rest of the page without displacing any content? I've searched extensively on Google and YouTube for tutorials on databa ...

Issue encountered with JavaScript function within TypeScript file connected to HTML code

I am currently working on a simple SharePoint web part and encountering an issue with using a function from another module file in my main file. Snippet from the JSFunctions.module.js file (where I define my function): function getApi(){ [my code]... }; ...