473,698 Members | 2,551 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IE6 Bug - absolute positioned header DIV disappears

Hi all,

I am sure something like this has been covered somewhere so I am hoping
a quick answer or pointer may suffice, however a couple of days
trawling and I can't find anything on it.

I'm building a layout and for reasons of PDA and text based browsers I
want to have my primary navigation at the bottom of the HTML layout.
Thus the main content and supplementar content are positioned higher in
the document structure then the links go at the end.

However for proper browsers I want to put my links into a header and
push them to the top of the page.

You can see my HTML below with at the moment an embedded stylesheet for
testing. It works as expected in Mozilla however in IE6 I am getting a
strange bug which started because of another bug.

If I sized my 2 columns to make up 100% then they wouldn't float next
to each other - it was as though they were too big to fit the space so
I dropped the size by 1% making the total 99% and they fit fine.
However the header then disappeared ENTIRELY from view....

If anyone can shed any light on this it would be greatly appreciated as
I'd like to structure my HTML properly and not have to compromise on
this.

Cheers
AndrewF

HTML HERE:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dt d">
<html>
<head>
<!-- scripts etc all go in here -->
<script language="javas cript">
</script>
<style type="text/css">
body#tk_com {font-size: 0.8em; font-family: Verdana, Arial, Helvetica,
sans serif; margin: 0;}
body#tk_com div#container { margin: 0px auto; width: 70em; border: 1px
solid red;}
body#tk_com * h1 {font-size: 1.3em; font-weight: bold;}
body#tk_com * h2 { font-size: 1.1em; font-weight: bold;}
body#tk_com * h3 { font-size: 0.9em; font-weight: bold;}

/** define main header area so the nav can be repositioned into it. **/
body#tk_com div#container {margin-top: 150px; }

/** make the header info stuff come up from the bottom of the page **/
body#tk_com div#container div#header_info {position: absolute; top: 0;
margin-left: -1px; border: 1px solid green; width: 70em;}

/** make the nav stuff here **/
body#tk_com div#container div#header_info div#nav {margin-top: 123px;}
body#tk_com div#container div#header_info div#nav h3{display: none;}
body#tk_com div#container div#header_info div#nav ul {margin: 0px;
height: 25px; background-color: #000;}
body#tk_com div#container div#header_info div#nav ul li {display:
inline; margin: 0;}

/** make the main content area here **/
body#tk_com div#container div#main_conten t {width: 79%; float: left;
border: 1px solid red;}

/** make the supplementary content area here **/
body#tk_com div#container div#supplementa ry_info {width: 20%; float:
right; border: 1px solid blue;}

/** make the footer here **/
body#tk_com div#container div#footer {clear: both;}
</style>
</head>
<body id="tk_com">
<div id="container" >
<div id="main_conten t">
<div id="intro">
<h1>Page title</h1>
<div id="summary">
<p>summary texzt fjdlfdklfjsdl</p>
</div>
</div>
<div id="main_info" >
<h2>Sub head</h2>
<p>fhjfkj fdkjfhdslkj dslfkjhdslfkd fksjhf dsal</p>
</div>
</div>
<div id="supplementa ry_info">
<div id="specials">
<h3>Specials header</h3>
<p>Specials text etc</p>
</div>
<div id="related_inf o">
<div class="related" >
<h3>Related header</h3>
<p>Text about the related item</p>
</div>
<div class="related" >
<h3>Related header</h3>
<p>Text about the related item</p>
</div>
</div>
</div>
<div id="header_info ">
<div id="nav">
<h3>Site Navigation</h3>
<ul>
<li><a href="courses"> Courses</a></li>
<li><a href="courses"> News</a></li>
<li><a href="courses"> Contact</a></li>
<li><a href="courses"> Gallery</a></li>
<li><a href="courses"> Location</a></li>
<li><a href="courses"> Facilities</a></li>
<li><a href="courses"> Safety</a></li>
<li><a href="courses"> Links</a></li>
<li><a href="courses"> About Us</a></li>
</ul>
</div>
</div>
<div id="footer">
<p id="crightNotic e">Copyright &copy; 2003 - 2006 TK. Powered by XML
&infin;. Hosted by clustered.net</p>
<p>some extra text in here yada yada yada yada</p>
</div>

</div>

</body>
</html>

Apr 3 '06 #1
1 4803
AndrewF wrote:
Hi all,

I am sure something like this has been covered somewhere so I am hoping
a quick answer or pointer may suffice, however a couple of days
trawling and I can't find anything on it.


Just a note: I didn't look over your code - and for future reference, it
would have been much easier if you had provided a link that I could have
looked at (I could have told for sure if my "diagnosis" is accurate by
observing the actual page)

That said, from the way you describe it, I think you might have
encountered the "Peekaboo" bug. Google that ( peekaboo bug, or explorer
peekaboo bug ) and you'll find plenty of discussion. I recommend looking
over PIE while you're at it (they have an article on this)
http://www.positioniseverything.net

Apr 3 '06 #2

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

Similar topics

8
42517
by: Asad | last post by:
Hi, I am basically trying to accomplish drop down menus for navigation on a site. And I'm pretty much done except I am having one problem. The z-index is not working with relative positioning! Basically I have a page such as this: http://members.rogers.com/asadkhan2/prob2.jpg
4
16142
by: Philipp Lenssen | last post by:
Is it possible in IE6+NS7 to center-align a div of fixed width which itself contains elements which use "position: absolute"? Using "margin-left: auto" and "margin-right: auto" works well to center something, but the absolute-positioned contents of the outside layer will be stuck to the left of the window...! Thanks a lot! -- Google Blogoscoped http://blog.outer-court.com
4
4593
by: mike eli | last post by:
Hi, I have several absolute positioned elements inside an absolute positioned DIV. I would like one of the nested elements to have a dynamic width. I set it's left and right attributes to 5, so the the element should have a width = parentWidth - 10; This is the desired behaviour, but it won't work. I still have to specify a width or the element has a width of 0. Setting the width to '100%' doesn't give me the desired effect; it takes...
10
3909
by: jlub | last post by:
What I'm trying to do is have two different sets of input elements which occupy the same space on the page, only one of which is visible at a time. You switch between the two with a bit of javascript. How I've done it is to have one of the two sets be absolutely positioned. Here is a short version: <html> <body> <script> function toggleAdvanced() {
9
1356
by: Will Hartung | last post by:
http://localhost:8080/funwar/Homepage.jsp http://localhost:8080/funwar/Strategy.jsp Can someone perhaps enlighten me as to why the top nav section on the Homepage linked above is not being positioned relative to the page, but rather something else (and it's not clear what). The second page shows it working. I've looked at this with the Firefox DOM and CSS inspectors, and it looks
3
6598
Banfa
by: Banfa | last post by:
This page contains a cut down version of this page. They both display the same problem, when the menu at the top is dropped down in IE7 the menu (which is positioned absolutely) disappears behind the floated items in the main content below it. (the second page is really given to show the context otherwise the display choices in the first page would appear slight odd). The pages both work fine in FF 3 and Opera 9.5 (and FF 2 if memory...
7
20486
by: chemlight | last post by:
I am having an issue with HTML elements not printing when positioned absolutely when they extend beyond the first page. I am working on some foreign tax refund forms. The forms are cut into multiple jpg images, so that I can position them on the HTML page, so that they print properly (page1, page2, etc). The information to complete the forms is then positioned using position: absolute and a z-index of +1. Here is an example code of my...
0
1310
by: shu fenghua | last post by:
The problem is when i want to put an element("a" in my code) into an absolute positioned element and i also want this element("a") has a fixed height, then ie6 will render this element("a") as a common block element with a 100% width. I also found that if any css property can make element hasLayout added to the element in absolute positioned element in ie6, the problem will occur. ie7 8 and other standard browser can show it correctly. ...
0
8680
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9169
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8871
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2335
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.