Fixing Disappearing CSS Arrows with :after Pseudo-element

On a vertical sub-nav found at , I have a css arrow that is not displaying correctly. It should be on the outer right hand side, but part of it is being cut off. If I try to move the arrow further to the right, it disappears altogether. What can I do to ensure that it appears on the right hand side as intended?

I would like it to function in the same way as demonstrated on this page:

Thank you

Answer №1

Within your CSS file, look for the following code snippet:

.z-tabs li:hover:after, .z-tabs li:focus:after, .z-tabs li.z-active:after
on line number 389. Update the value of left:95% to left:93%.

Answer №2

To achieve the desired effect, I suggest styling the LI item without a colored background and only including the arrow within it. The A element inside the LI can have a margin on the right to accommodate the arrow while the colored background should be applied to the A element itself.

In this scenario, it is recommended to place the background color between the gray background and the dotted border as shown in the code snippet below:

ul {
    list-style: none;
}

ul li {
    width: 120px;
    border: dotted 1px gray;
    line-height: 25px;
    margin-bottom: 5px;
}
ul li a{
    width: 100px;
    margin-right: 5px;
    background-color: #ccc;
    line-height: 25px;
    display: block;
}

Parts of your HTML code can be utilized as follows:

<ul class="z-tabs-nav z-tabs-desktop">
    <li class="z-tab z-first z-active" data-link="tab1" style=""><a class="z-link">Cloud</a>
    </li>
    <li class="z-tab" data-link="tab2" style=""><a class="z-link">Onelogin</a>
    </li>
    <li class="z-tab" data-link="tab3" style=""><a class="z-link">Nimble CRM</a>
    </li>
    <li class="z-tab z-last" data-link="tab4" style=""><a class="z-link">Service Now</a>
    </li>
</ul>

For a visual representation of the suggested changes, you can visit http://jsfiddle.net/7pex9/.

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

Responsive issue identified with Bootstrap navbar hamburger menu upon clicking

My website has an issue on mobile where the hamburger menu appears but doesn't respond when clicked. I'm unsure what's causing this problem in my code. <nav class="navbar navbar-expand-lg navbar-light bg-light"> <a ...

Tips for correctly positioning CSS elements:

I am currently working on a slider using noUi Slider and aiming for an elegant solution. To accommodate the large size of the handle, I expanded the base UI with extra values which are not allowed, causing the handle to jump back to the permitted values. T ...

How can I add text to the title of a border using Bootstrap5?

I am attempting to create a design where text appears within the border of an element. I am currently utilizing Bootstrap 5 and jQuery for this project. Despite my efforts with fieldset and legend elements, I have not been successful in achieving the desir ...

Encountered SyntaxError: An unexpected token has been found while integrating leaflet with flask

Despite adding all necessary scripts and configuring my API_KEY in config.js, I keep getting an error message saying "Uncaught SyntaxError: Unexpected token." I have double-checked my API key multiple times, and it seems to be correct. Here is a snippet f ...

After applying 'all: unset;' to remove all styles, the CSS hyphens property does not work as expected in Chrome

After applying this CSS code to remove all styles: * { all: unset; display: revert; } The issue arises in Chrome browser where CSS Hyphens are not taking effect. This can be seen with the following example: div { font-size: 3rem; -webkit-hy ...

Having trouble getting wire:click to work within an if statement in Laravel Livewire

I am currently in the process of creating a popover feature for my website that should open when I click on a phone number. Upon clicking on the phone number, it triggers a function called "startCall" in my Livewire component which sets the value of $calli ...

Adjust the width of the react-bootstrap container

Is there a way to make the default container width in Bootstrap smaller while ensuring it remains consistent across all viewports? I am looking to decrease the total width of the container, making it relatively shorter than its current size. How can I ach ...

Pinterest Style Card Layout using React-Semantic-UI

Utilizing semantic-ui-react in React, I am working on displaying cards with varying heights based on the amount of text. I am aiming for a pinterest style layout where each card's height adjusts according to the content it contains. .... <Card.Co ...

What methods can be used in CSS to create this specific design using only two images?

Searching for a way to display two images side by side on a webpage with specific criteria. 1) Final look should resemble this: https://i.sstatic.net/XA8V3.jpg 2) Both images must be clickable links (e.g. mysite1.html and mysite2.html) 3) Both images ...

Struggling to solve these two CSS Animation issues

I am struggling to replicate a CSS animation similar to this example Currently, I am facing challenges with two specific aspects: #1 - The arrow of my triangle must consistently point towards the circle, but my attempts at rotating it only result in the ...

What causes the Footer to appear as a floating element in Tailwind CSS?

I've implemented the tailwind CSS footer into my NextJS project to display fetched data. However, I encountered an issue where the footer only floats when there is less data present. To address this problem, I created a separate footer file within my ...

Tips for designing a unique layout inspired by Pinterest: create a visually appealing grid where each item has a consistent height, but varying

While browsing the Saatchi & Saatchi website yesterday, I was impressed by their unique layout that utilizes varying post widths that resize effectively on smaller windows. Upon inspecting the source code, I discovered that they categorize posts as Small, ...

The text in the TextArea is not displaying line breaks as expected

Similar Question: Issue with new line preservation in .val() method for textarea I'm facing an issue where my text area does not preserve newlines when I enter a message with multiple lines. Even after retrieving the value from the text area, the ...

Having issues making div elements with javascript

I am having trouble generating new divs when a specific div is clicked. Despite my efforts, nothing seems to be happening and the console isn't showing any errors. I've searched online for solutions but haven't found anything that addresses ...

Is it feasible to retrieve and view local storage data within an Electron application?

I created an electron application that enables users to drag and drop elements like divs on the screen, saving their positions in localstorage as a class. The purpose is to ensure that any modifications made by the user persist even after reloading or re ...

Rotating Images in 3D with CSS

I am looking for guidance on how to create a rotating image effect on a webpage using CSS/JS. The image should rotate into the plane of the page, similar to the example shown in this post. Can you assist me with this? To better illustrate what I'm tr ...

Ways to position the second section below the button

Is there a way to make a section of my website where, upon pressing a button, the button moves to the left and reveals collapsed text that appears below it with some padding on top? I've been trying to achieve this as a beginner by looking through doc ...

When attempting to print using React, inline styles may not be effective

<div styleName="item" key={index} style={{ backgroundColor: color[index] }}> The hex color code stored in color[index] displays correctly in web browsers, but fails to work in print preview mode. Substituting 'blue' for color[index] succe ...

Change shapes of figure blocks using Internet Explorer (I am using IE11)

Good day! I have implemented this code to create a flip effect on the blocks of my website: .tegels { /*position:relative;*/ width:25.2%; height:37.4%; overflow:hidden; float:left; margin-top:3.5vw; margin-bottom:0px; m ...

Hiding a button based on the visibility of another button in the user's viewport

Is there a way to dynamically hide button B when the user scrolls and button A becomes visible on the screen? Additionally, how can we show button B again once button A is no longer visible to the user? Both buttons should never be visible simultaneously. ...