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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:53:17+00:00 2026-05-23T21:53:17+00:00

A fully working example is availiable here on jsFiddle . I strongly encourage you

  • 0

A fully working example is availiable here on jsFiddle. I strongly encourage you to look here as the CSS is kind of large, and I didn’t want to paste it here (making my question hard to read).

I have a horizontally centered tabstrip on my site, the idea is the UL/LI items are centered on the page and I have a solution that up until very recently (looked) like it worked on all browser configurations.

The html for this is actually quite simple:

<div id="tabContainer">
    <ul>
        <li style="width: 190px;"><span><a href="#">Tab One with more text</a></span></li>
        <li style="width: 190px;"><span><a href="#">Tab Two</a></span></li>
        <li style="width: 190px;"><span><a href="#">Tab Three is wide</a></span></li>
    </ul>
</div>
  • Each <li> is a tab, it’s got left padding for the left rounded tab stuff.
  • Each <span> has right padding for the right rounded tab stuff.
  • Finally the <a> generally fills up the remainder making for a large click target.
  • Each Item is manually styled with a width: 190px which keeps thier widths uniform (for a nice visual look, this is customized by the site code so it’s in a style vs a class.

The CSS:

  • The CSS works off a simple concept, the <ul> is shifted 50% right, and the <li> is shifted 50% left (left: -50%;) to put them always in the center of the master container.
  • The tabs overlap a bit using negative margin & z-index so the corner pieces criss-cross (done in the background image which isn’t important here)

The Problem

IE7 decides that it’s not going to listen to the explicit style="width: 190px", even if !important is added to it. However, this only seems to happen when left: -50% is present on the <li> item. If that style is removed the tabs shift to the right (wrong location, but correct fixed width).

To me, this seems like it’s unrelated as there’s nothing the left: -50% would cause the items to collide with forcing them to go to thier minimum width.

This setup works correctly and is tested in:

  • IE8
  • IE9
  • FF3.6
  • FF5
  • Chrome Stable (v13)*
  • Chrome Beta (v14)*
  • Safari 3

*As of July 18th, 2011


So, what could be causing this? Why is it happening? How can I fix it? I’ve tried all sorts of tweaks, and cannot get it to obey the width…


Image so you can SEE the problem side-by-side:

Problem http://img715.imageshack.us/img715/3686/ie7centertabsproblem.png

  • 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-05-23T21:53:19+00:00Added an answer on May 23, 2026 at 9:53 pm

    I suggest putting style="min-width:190px; max-width:190px;" instead of style="width:190px;". It works fine for me in IE7 document/browser mode.

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

Sidebar

Related Questions

Suppose there is a fully populated array of data String[n][3] myData. I want to
I have a small VB.NET application that I'm working on using the full version
I'm trying to fully understand all of Haskell's concepts. In what ways are algebraic
In order to fully use LinqToSql in an ASP.net 3.5 application, it is necessary
I'm fully aware that set division can be accomplished through a series of other
I am using fully qualified name of the enum inside a method in one
The singleton pattern is a fully paid up member of the GoF 's patterns
This is something that I have never fully grasped in .NET as to the
I discovered to have some problem to fully understand callbacks scoping when trying to
I've got two branches that are fully merged together. However, after the merge is

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.