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

  • SEARCH
  • Home
  • 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 7859179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:48:31+00:00 2026-06-02T21:48:31+00:00

I am trying to generate a menu like the following: There are several items

  • 0

I am trying to generate a menu like the following:

enter image description here

There are several items in the menu and the active one has an arrow after it.
The menu items are tags like the following code:

<div class="menuCenter">
     <div class="linksWrapper">
      <a href="#">Home</a>
      <a class="menuCenterLinkLeft" href="#">Plans & Pricing</a>
      <a class="menuCenterLinkLeft" href="#">Sign In</a>
      <a class="menuCenterLinkLeft active" href="#">Sign Up</a>
      <a class="menuCenterLinkLeft" href="#">Contact</a>
     </div>
</div>

I tryied two options:
1- Absolutely positioning the arrow image with javascript. I have problems when resizing the page.
2- Using the :after pseudo element, like this:

.linksWrapper a.active:after
{
    content: url("images/arrowImg.png");
    position: relative;
    left: -40px;
    top: 30px; 
}

The problem with this approach was the horizontal alignment of the arrow. It should be below the center of the link and I could not achive that.
I can use HTML5 or CSS 3.

Any help?

  • 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-02T21:48:34+00:00Added an answer on June 2, 2026 at 9:48 pm

    Try this:

    .linksWrapper a.active:after {
        content: url("images/arrowImg.png");
        position: absolute;
        left: 50%;
        top: 30px;
        margin-left: - <width-of-your-image> / 2; /* negative number!*/
    }
    

    sidenote: I avoid putting { on a newline, since it may have nasty effects in javascript.

    The trick is left:50%; combined with correcting the position by setting it back half width via margin-left.

    See example.

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

Sidebar

Related Questions

I'm trying to generate the following html code using cl-who: <html> <body> <div id=cnt_1></div>
What I'm trying to do is, to generate nav menu like <ul> <li> <ul>
My db table looks like that. I'm trying to generate nav. menu from db
I am trying to generate dynamic menu according to the user permission given with
Im trying to generate a color gradient using ColdFusion. My current code below works
Trying to generate db driven menu which based on parent->child structure. All root menu
I am trying to re-create the menu items from main menu in Joomla in
I'm trying to import one of the GWT samples into Eclipse by following the
I'm trying to generate environment-independent links in a navigation menu with Symfony routing system.
Trying to generate JavaDocs for the Android lint-cli project on Mac 10.7 Keep getting

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.