473,398 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Problem making tabs in IE6

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
Jun 26 '06 #1
1 1745
Els
Andrew Gillett wrote:
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>


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.

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/
Jun 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

102
by: Skybuck Flying | last post by:
Sometime ago on the comp.lang.c, I saw a teacher's post asking why C compilers produce so many error messages as soon as a closing bracket is missing. The response was simply because the compiler...
12
by: ishtar2020 | last post by:
Hi everybody I've been writing my very first application in Python and everything is running smoothly, except for a strange problem that pops up every once in a while. I'm sure is the kind of...
2
by: uarana | last post by:
Hi All, I've been plugging away at this problem for a while now and was wondering if anyone had an idea they could share. I'm working on a document management database that tracks revisions of...
9
by: ApexData | last post by:
My main form has tab-pages. On each tabbed page is a subform control containing a different subform. When a user selects a specific tab and begins to edit a record, I need a way of preventing the...
7
by: Dr J R Stockton | last post by:
I want page <URL:http://www.merlyn.demon.co.uk/js-quick.htmto open, in IE6, IE7, Firefox 2, and wherever else practicable, with the control labelled F.X0 fully visible at the top of the window and...
5
by: Raj | last post by:
Following is a code to replace blanks in entered string with adequate number of tabs & spacings as required. I've taken the width of tab as 5 characters here. The problem that occurs here is for...
2
by: stevemtno | last post by:
I've got a problem with a web page I'm working on. I have 4 modules - one of them has 2 tabs, two of them have 4 tabs. When the user clicks on the tabs, the content below them changes. However, when...
87
by: pereges | last post by:
I have a C program which I created on Windows machine. I have compiled and executed the program on windows machine and it gives me the consistent output every time i run it. for eg. input a = 2,...
5
by: dangt85 | last post by:
Hello, I have the following page: ... <style type="text/css"> body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; }
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.