Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / June 2006



Tip: Looking for answers? Try searching our database.

Problem making tabs in IE6

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andrew Gillett - 26 Jun 2006 02:20 GMT
I have made a mock up for a web application that requires the use of tabbed panels. I've looked at some good examples of how to implement the tab bar (e.g. sliding doors on a list apart), but I have a requirement to include an icon on each tab, "to make it look snazzy". So I have tried to roll my own.

I've got the screen looking pretty much the way I want (see http://asgillett.googlepages.com/app.html), but a problem occurs when an IE6 browser window is made too narrow for the tab bar. Each tab item tends to split up into multiple lines (see http://asgillett.googlepages.com/problem.jpg).

Can anyone suggest how to prevent IE6 from breaking a tab-item into multiple lines?

The structure of the tab bar is a div containing a list, and each list element consists of four parts:
- a div with background image for the left rounded corner
- an image of an icon with background image of the tab center
- a link with background image of the tab center
- a div with background image for the right rounded corner

<div class="tabs">
 <ul class="tab-bar">
   <li class="tab-item">
     <div class="tab-left"></div>
     <img src="skull.gif" class="tab-icon" alt="Skull"/>
     <a href="#" class="tab-label">Skull</a>
     <div class="tab-right"></div>
   </li>

If I set the exact width of each list item, then I get the behavior that I want. Unfortunately I don't know how to calculate the required width - it depends on the text size the user has selected (out of my control), the number of characters in the label and I don't know what else.

Oh, and it works fine in FireFox...

Andrew
Els - 26 Jun 2006 07:13 GMT
> I have made a mock up for a web application that requires the use of tabbed panels. I've looked at some good examples of how to implement the tab bar (e.g. sliding doors on a list apart), but I have a requirement to include an icon on each tab, "to make it look snazzy". So I have tried to roll my own.
>
[quoted text clipped - 16 lines]
>       <div class="tab-right"></div>
>     </li>

Have you tried nesting the lot?

    <li class="tab-item">
      <div class="tab-left"><div class="tab-right">
    <a href="#" class="tab-label"><img src="skull.gif" class="tab-icon"
alt="Skull"/>Skull</a>
      </div></div>
    </li>

ISTR the sliding doors nesting just a LI, SPAN and A for the same
effect, and AFAIR they don't break.

Signature

Els                           http://locusmeus.com/
accessible web design:     http://locusoptimus.com/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.