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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:51:06+00:00 2026-06-17T11:51:06+00:00

How do I cleanly style a HTML + CSS horizontal tab bar so that

  • 0

How do I cleanly style a HTML + CSS horizontal tab bar so that the tab bar has a line across the bottom that’s hidden or suppressed for the active tab?

In other words, I’m trying to do the same thing that StackOverflow does for its tags:
enter image description here

My tab bar is set up as an ordered list with

ul
{
  list-style: none;
}
li
{
  float: left;
}

Update: I’ve already poked around sites with Firebug to see how they do it, but I feel like I quickly get bogged down in details. For example, StackOverflow’s version has a border for the bottom of the whole div (which makes sense), and a white border for the bottom of the active tab (which makes sense), but then it makes the active tab’s border overlap the div’s border (and I’m not very clear on how it does that). It looks like Twitter Bootstrap does something similar. I’m trying to understand the general concept of how overlapping part of a container’s border with the content’s border works instead of copying and tinkering with CSS until I get something that appears to work.

  • 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-17T11:51:07+00:00Added an answer on June 17, 2026 at 11:51 am

    All you need to do is put a bottom border on the <ul> (so that it stretches across) and then give the <li>‘s a selected class, and make that one have a 1-pixel higher height.

    Here is a very simple example: http://jsfiddle.net/V6gzS/

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

Sidebar

Related Questions

I have some HTML that looks something like this: <div id=zoomed style=display:none; position:absolute;> <a
Assume that I have some HTML page, and a corresponding CSS file. I'd like
<!DOCTYPE html> <html> <head> <style type=text/css> #container { border: 1px solid red; } body
I am programmatically generating HTML and want to link to a CSS file that
I'm trying to format some strings for output on the command-line, report style, and
What are the current rules for writing python code that will pass cleanly through
I have an object in PHP (in my case, a CakePHP model), that has
I noticed that every browser renders the border-style: inset; property differently, so I had
Quite confused here. <html> <head> <style> .one { font-weight: normal; } .two { font-weight:
I have the following HTML... <img id=image1 src=URL alt=image1 name=image1 width=137 height=119 border=0 style=position:

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.