Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7960075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:40:15+00:00 2026-06-04T04:40:15+00:00

I’m trying to achieve this mouseover effect with the smallest footprint possible. I can’t

  • 0

I’m trying to achieve this mouseover effect with the smallest footprint possible. I can’t get the arrow (.png) to display, it gets cut off by the height and I’m not sure how to get the height to show. I’ve tried several failed methods so far, hoping someone can help me out.

What I’ve done is style the anchor for the box and try to position the small arrow below the box. The arrow isn’t displaying outside of the box in the anchor, it gets cut off. I tried making the arrow the part of the LI, it worked but because the anchor needs to be 30px (height of the blue box) and the LI needs to be 40px (box + the height of the arrow 10px) it will display the arrow if you mouse over that 10px area and not the box.

currently it looks like this.

Here is my css:

#navlist {
float:right;
}
#navlist li {
line-height:40px;
display:inline;
list-style-type: none;
margin-right: 20px;
}
#navlist li:hover {
background:url(../img/navArrow.png) no-repeat center;
background-position:50% 30px;
}
#navlist li a {
height:30px;
padding:3px 5px 3px 5px;
color:#26627f;

}
#navlist li a:hover {
background:#035173;
border-radius:3px;
color:#fff;
}

and here is the html:

<ul id="navlist">
    <li><a href="#">Get a Quote</a></li>
    <li><a href="#">Learn about Life Insurance</a></li>
    <li><a href="#">Our Company</a></li>
    <li><a href="#">Get Help</a></li>
</ul>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:40:15+00:00Added an answer on June 4, 2026 at 4:40 am

    You could simply add the following to your CSS:

    #navlist li:hover a::after,
    #navlist li a:hover::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        margin: 0 0 0 -1em;
        border: 1em solid transparent;
        border-top-color: #035173;
    }​
    

    JS Fiddle demo.

    This does, of course, require that the user have a browser that implements CSS generated content and pseudo-elements.


    Edited in response to comment from OP, in comments below:

    Not really sure how you are getting a shape out of that, care to explain? It works. Is there any way to make the arrow smaller and can it take a box-shadow effect?

    It works because the border of an element meet at 45°, and because there’s no height/width for the element that produces a triangular shape ‘pointing’ towards the centre of the element (or, in this case, the pseudo-element). If all four borders were visible you’d have a square; if top and bottom were visible you’d have a triangular ‘hourglass,’ and so on.

    To make the triangle smaller, simply assign a smaller unit to the border-width (in the example above the borders are set to 1em, simply change it to 5px or, well, any other size and unit of measurement that the browser can implement.

    The negative margin-left (the -1em in the margin declaration) has to be equal to the border-width in order to place the pseudo-element centrally along the horizontal axis, but it can be adjusted to taste.

    To add a box-shadow is difficult, since all four borders have to be assigned to create the triangular shape, the box-shadow would be a rectangle for the whole element, not just the ‘visible’ part of it. It can be emulated, if you’re okay about using another pseudo-element, in this case the ::before, but it won’t have the usual ‘fuzziness’ of a genuine box-shadow, but, as a demonstration, simply copy the above CSS, amend the ::after to ::before (and make sure the ::before element occurs before the declaration for ::after, as the later-declared element will be above the previously-declared element). Adjust the margins and the border-top-color properties and it should look okay-ish:

    #navlist li:hover a::before,
    #navlist li a:hover::before {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        margin: 0 0 0 -0.7em;
        border: 1em solid transparent;
        border-top-color: #ccc;
    }
    
    #navlist li:hover a::after,
    #navlist li a:hover::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        margin: 0 0 0 -1em;
        border: 1em solid transparent;
        border-top-color: #035173;
    }​
    

    JS Fiddle demo.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.