I'm feeling silly but for all that is holy, I cannot get this thing to work. It works okayish in Firefox but it is clearly broken in IE 6, which is the minimum requirement for this application.
What I am trying to do is a horizontal tabbed menu bar. It does not sound too difficult, I know.
The image I've attached to this post shows what I am trying to achieve.
- I'd like the tabs to auto-expand. In other words: no fixed width. This is what breaks it for me in IE 6.
- The icons should be positioned in the upper right corner of a tab. All tabs in this list will have these icons.
- The ul element will have a gradient background color so I'd like it to automatically adjust its height.
- Floating the elements in the <li> appeared to be the easiest solution beforehand but I could not get it to work. Why? Who knows. To place the icons/controls, I went with absolute positioning.
The markup code looks something like this:
HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en" dir="ltr">
<head>
<title>tabs</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
@import "tabs.css";
</style>
</head>
<body>
<div id="eventListContainer">
<ul id="eventList">
<li class="eventTab">
<div id="event1" class="event">
<span class="title">[Title.text]</span>
<span class="info">[Misc.text]</span>
</div>
<ul id="controls1" class="controls">
<li><a class="close" title="close">x</a></li>
<li><a class="activate" title="activate">▼</a></li>
</ul>
</li>
<li class="eventTab current">
<div id="event2" class="event">
<span class="title">Nothing - Something</span>
<span class="info">Game of the year...</span>
</div>
<ul id="controls2" class="controls">
<li><a class="close">x</a></li>
<li><a class="activate" title="activate">▼</a></li>
</ul>
</li>
<li class="eventTab">
<div id="event3" class="event">
<span class="title">[Title.text]</span>
<span class="info">[Misc.text]</span>
</div>
<ul id="controls3" class="controls">
<li><a class="close" title="close">x</a></li>
<li><a class="activate" title="activate">▼</a></li>
</ul>
</li>
</ul>
<br style="clear:both;">
</div>
</body>
</html>
As you may have guessed from the ids, the list will be dynamic. It'll be possible to create tabs and remove them from the list.
The links in the "controls" will be styled by using image replacement and mouselistener will be set, etc etc.
What I need help with is getting the darn tabs to position the elements correctly. If needed, the HTML can be altered.
Bookmarks