Conceal content within a bullet point

I'm encountering an issue with this specific element.

HTML

<div class="navbar slide-menu">
<div class="container">
    <ul class="nav navbar-default">
        <li class="brand"><a href="#">Menu</a></li>
        <li class="make-hidden"><a href="#">Home-to landing page</a></li>
        <li class="make-hidden"><a href="#">More-find out more</a></li>
        <li class="make-hidden"><a href="#">Social-connect with us</a></li>
        <li class="make-hidden"><a href="#">Contact-find us near you</a></li>
    </ul>
</div>

CSS

.slide-menu{
float:left;
width:50%;
height: 100%;
margin-left:0px;
margin-top:100px;
}
.container{
margin-left:0;
padding: 0;
}
.nav{
width:25%;
margin-left:0;
}
.make-hidden{
position: absolute;
width:15%;
z-index: 1;
overflow: hidden;
}
.make-visible{
width:100%;
transition:width 0.7s linear;
}

In addition, there is some JQuery code to make the li elements expand to 100% width on mouse enter. However, my challenge lies in displaying only a portion of text inside the hidden li element without resizing it to full width and height. Is there a solution or workaround for this? Appreciate any insights! Thanks

Further information:

Answer №1

.slide-menu {
  float: left;
  width: 50%;
  height: 100%;
}
.container {
  margin-left: 0;
  padding: 0;
}
.make-hidden {
  /* position: absolute; */ /* <------------- removed */
  width: 15%;
  white-space: nowrap; /* <----------------- this is key */
  z-index: 1;
  overflow: hidden;
  transition: width 0.7s linear; /* <--------- this has been moved */
}
.make-hidden:hover {
  width: 100%;
}
<div class="navbar slide-menu">
    <div class="container">
        <ul class="nav navbar-default">
            <li class="brand"><a href="#">Menu</a></li>
            <li class="make-hidden"><a href="#">Home-to landing page</a></li>
            <li class="make-hidden"><a href="#">More-find out more</a></li>
            <li class="make-hidden"><a href="#">Social-connect with us</a></li>
            <li class="make-hidden"><a href="#">Contact-find us near you</a></li>
        </ul>
    </div>
</div>

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

What is causing the data element to remain unchanged within a Vue.js function and what steps can be taken to ensure its value can be updated?

Using the axios API in the created() function, I am able to access webURLs. When a mouseover event triggers a v-for handler in the HTML file, the index is obtained and assigned to the selectedState data element. Although the value of selectedState changes ...

Retrieve the unique identifier of a div using JavaScript/jQuery

I am faced with a situation where I have two sets of divs structured as follows: First Div <div class="carousel"> <div class="item active" id="ZS125-48A">...</div> <div class="item" id="FFKG-34">...</div> <div cl ...

The media query for mobile is not functioning properly

Hello, I have a page with MVC that includes CSS for iPad and mobile devices. The media query for iPad (@media only screen and (min-device-width: 768px) and (max-device-width: 1024px)) works perfectly, but I am struggling to get the media query for mobile ...

Repairing a CSS file for Internet Explorer versions 7, 8, and 9

Does anyone have experience with troubleshooting HTML5 CSS3 layouts across different browsers? I recently created a website layout from scratch that looks perfect in Firefox 5, Safari 5.1 and Chrome 12 on Mac. However, when using tools like Adobe BrowserL ...

Python Ordering menu items for the Pelican restaurant

In response to jcollado's advice on this thread, I have set up my menu as per his instructions. However, I am facing difficulty adding the active CSS to the active item. DISPLAY_PAGES_ON_MENU = False DISPLAY_CATEGORIES_ON_MENU = False MENUITEMS = ( ( ...

What is the best way to tailor specific text in d3.js?

I need assistance with customizing the appearance of an asterisk added to the end of a template literal in d3js. I want to be able to independently adjust the size and color of the asterisk regardless of the variable it's attached to. Below is the cod ...

Modify the color of the Swing link label for disabled state

I'm currently working with Java Swing linkLabel. I've noticed that when the link is disabled, it appears in gray by default, but I would like it to be black instead. Is there a method available to change the color of a disabled link label? ...

A guide to incorporating external CSS files in Angular 5 components using styleUrls

I have a unique setup where my Angular 5 application resides in a subdirectory within another parent application. The parent application consists of JSP and other AngularJS applications among other things. My goal is to include a CSS file from the parent ...

Merge web address when form is sent

I'm currently working on a search application using the Django framework and the Yelp API as my backend, which is functioning properly. However, I am facing some challenges with the frontend development, specifically integrating Leaflet.js. My search ...

Unable to display favicon when using the include function

How can I add the favicon link to my website? In my header.php, I have added the link for my ico favicon, but when I try to include it in my index file, the favicon does not show up. I attempted to insert the favicon code directly into the index.php file, ...

Utilizing PHP, Javascript, and jQuery in mobile technology gadgets

Can anyone recommend mobile technology products that have been developed using PHP, Javascript, and jQuery? What are the newest mobile products available on the market that have been built using these languages? Do popular devices like iPhone, BlackBerry ...

Optical imaging-guided Page Division

Looking for guidance on implementing a program that can perform "Vision-based Page Segmentation" with practical information rather than just theoretical knowledge. I prefer using JS (jQuery) and PHP for this project. After reading the article on VIPS: a ...

Text aligned vertically within an element using the table-cell display attribute in the Chrome browser

Struggling to align text inside an element styled with display: table-cell? The issue arises when dealing with multiline text in a tab format. Achieving the correct vertical-align: middle; requires displaying it as a table-cell, which works well in most ca ...

Is it possible to utilize AJAX to load the URL and then extract and analyze the data rather than

I had originally created a web scraping method using PHP, but then discovered that the platform I was developing on (iOS via phone gap) did not support PHP. Fortunately, I was able to find a solution using JS. $(document).ready(function(){ var container ...

Provide solely the specified content range

While working with Node.js, my goal is to develop a video server that can serve a specific portion of a larger media file. Thanks to this gist, I have successfully created a video server and integrated it with an HTML5 video player using: <video contr ...

What is the best way to save high-resolution images created with HTML5 canvas?

Currently, there is a JavaScript script being used to load and manipulate images using the fabricjs library. The canvas dimensions are set to 600x350 pixels. When smaller images are uploaded onto the canvas and saved as a file on disk, everything works c ...

Hide the footer DIV in CSS by making it disappear with a height of 100%

I'm currently facing an issue with my CSS layout. Despite managing the problem in IE and seeing everything work well, the footer container has mysteriously disappeared! I've attempted to recode the CSS without success, even after trying for days ...

Customize your Bootstrap 4 accordion cards with added margin and a sleek design without the usual bottom

After incorporating Bootstrap's accordion component, I made a custom adjustment by including spacing between the cards to achieve this layout (the - and + symbols were my addition and not important here): https://i.stack.imgur.com/5nRrP.png However, ...

Creating a responsive button inside a table can be achieved effortlessly with Angular Material table components

Help needed to ensure button responsiveness within a table. Here's how it appears on desktop and mobile screens: Desktop View Mobile View The delete button is somewhat obscured in the mobile view. This is the corresponding HTML code: <div ...

Struggling with aligning content within a div using CSS grid techniques

I am experimenting with CSS Grid and running into issues with overlaying content. The structure consists of a top-level container defined as a CSS grid (class="container"), followed by a content grid (class="content") that divides into 3 rows (header, labe ...