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 8338713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:40:48+00:00 2026-06-09T04:40:48+00:00

I’ve been experimenting with making a HTML/CSS navigation bar with chevron-shaped list items. I’ve

  • 0

I’ve been experimenting with making a HTML/CSS navigation bar with chevron-shaped list items. I’ve made my code available here: https://github.com/twslankard/css-chevron-bar/blob/master/index.html

Since my question is fairly specific, I’m offering up the code as public domain in the off chance that one of you CSS wizards will help me. 🙂

Now for my question. I’ve been trying to design the bar so that it scales properly, e.g. when someone modifies the font-size property of ul.chevronbar li or when the user hits Control+ or Control- in the browser.

I tried using two different CSS resets, both Eric Meyers Reset CSS 2.0 and YUI 3. However, in Firefox the scaling/zooming “mostly” works, and in Chrome it does not work (especially when zooming in). If possible, I’d like some advice on how to get this to work better in Chrome.

Here’s an image illustrating the issue. Your help is greatly appreciated.

enter image description here

EDIT: this is what I ended up with eventually. Pardon the messy CSS. I’ll get around to cleaning it up later.

https://github.com/twslankard/css-chevron-bar-2

EDIT 2: Another person generously provided their solution to this problem here: http://jsfiddle.net/pXBTK/3/

  • 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-09T04:40:50+00:00Added an answer on June 9, 2026 at 4:40 am

    Effectively, the trick is how to make the height of the pointy parts match the height of the menu item it follows, thus avoiding the jagged look.

    I am guessing that something like this causes the problem:

    • Calculated menu item height is 5 physical screen pixels
    • Each of the top and bottom borders that produce the arrow must be 50% of 5
    • Since you cannot display a half pixel, both round off, say to 3 pixels
    • Add together and the arrow becomes 6 pixels tall but menu item is only 5

    It seems clear then that the fix is to simply hide the overflow as stated. The only change really necessary to the original is:

    ul.chevronbar {
      ...
      overflow: hidden; /* Add this line */
    }
    

    It would also need resizing to get closer to the original look, but works without that. Fixed height is not actually necessary.

    This simplified example illustrates the arrow concept with highlighting for parts of the arrow:

    <head><style type="text/css">
    ul {
      background-color: lightgray;
      font-size: xx-large;
      overflow: hidden;
      position: relative;
    }
    li {
      display: inline-block;
      background-color: gray;
      margin-right: 1.5em;
    }
    li:after {
      content: '';
      border: 0.85em solid blue;
      border-left-color: red;
      border-right-color: red;
      height: 0;
      position: absolute;
      top: -0.2em;
    }
    </style></head>
    <body><ul>
      <li>Lorem Ipsum</li> <li>Foobar</li>
    </ul></body>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a jquery bug and I've been looking for hours now, I can't
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
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
i got an object with contents of html markup in it, for example: string
I have thousands of HTML files to process using Groovy/Java and I need to
I'm working with an upstream system that sometimes sends me text destined for HTML/XML

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.