Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE 6 bug? 1

Status
Not open for further replies.

jemminger

Programmer
Jun 25, 2001
3,453
US
hi all,

when viewed in IE6 SP1 (winxp pro), the crumb trail background is repeated once across the page about 20 px below. it seems to be tied to the "main" content div - if there is no text in that div, the bug doesn't happen.

all is well in Moz of course

anyone ever experienced this? any suggestions?

thanks

Code:
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;>
<html>
	<head>
		<title>test</title>

		<style type=&quot;text/css&quot;>
		#borderStaticTitle {
			font:bold 1em sans-serif;
			background:#006633;
			color:#ffffff;
			border:2px solid #000099;
			margin:5px 3% 0px 6%;
			padding:1px 2px 2px 4px;
		}
		#crumbs {
			background:#339933;
			font:bold 70% sans-serif;
			margin:-1px 3% 5px 6%;
			padding:1px 2px 1px 4px;
		}
		#navBar {
			position:absolute;
			top:5em;
			left:5px;
			border:2px outset #339933;
			background:#006633;
			margin-right:10px;
			padding:2px;
			width:6em;
			z-index:10;
		}
		#navBar ul {
			margin:0px;
			padding:0px;
			list-style-type:none;
		}
		li {
			height:1.1em;
		}
		#navBar a {
			text-decoration:none;
			border:1px solid #006633;
			color:#ffffff;
			display:block;
			padding:0px 5px;
			font:normal .9em/1em sans-serif;
		}
		#navBar a:hover {
			background:#339933;
			border:1px solid #66cc66;
		}
		.activeNav {
			background:#339933!important;
			border:1px solid #66cc66!important;
		}
		#main {
			margin:1em 3% 1em 6em;
			border:2px groove #006633;
			padding:5px;
		}
		p {
			text-indent:1em;
		}
		p:first-letter {
			font:bold 2em sans-serif;
			padding-right:1px;
		}
		</style>

		<meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=ISO-8859-1&quot;></meta>
		<meta http-equiv=&quot;Pragma&quot; content=&quot;no-cache&quot;></meta>
	</head>

	<body>
		<div id=&quot;borderStaticTitle&quot;>Home</span>
		</div>

		<div id=&quot;crumbs&quot;>Home > Some > Crumb > Trail</div>

		<div id=&quot;navBar&quot;>
			<ul>
				<li><a href=&quot;#&quot; class=&quot;activeNav&quot;>Home</a></li>
				<li><a href=&quot;#&quot;>Search</a></li>
				<li><a href=&quot;#&quot;>Login</a></li>
			</ul>
		</div>

		<div id=&quot;main&quot;>
			<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse eu purus et dolor cursus semper.
			Nulla lacus. Nunc neque quam, adipiscing a, blandit eget, molestie sit amet, erat. Nunc mauris pede, 
			sodales vitae, aliquam non, eleifend eget, felis. Pellentesque porttitor blandit leo. Nulla egestas. 
			Nulla tristique. Sed sapien pede, ornare in, vulputate eu, elementum at, urna. Aliquam erat volutpat. 
			Curabitur gravida libero in neque vestibulum porta. Maecenas felis orci, consequat id, feugiat vitae, 
			gravida sit amet, lacus. Vestibulum vitae felis. Nulla ultrices wisi eget massa. Nullam euismod. Nunc 
			commodo mattis elit. Cras nec quam id justo iaculis pretium. Pellentesque arcu. Aenean sed nibh.</p>

			<p>Integer sodales vehicula orci. Maecenas non urna in turpis placerat congue. Nam id lectus non tellus 
			tincidunt varius. Aliquam sit amet lectus eu tellus bibendum fermentum. Curabitur diam mi, auctor ac,
			nonummy aliquet, consectetuer non, dolor. Nam ac dui vitae velit mattis porttitor. Etiam enim metus, 
			tempor ut, euismod sed, venenatis sed, dolor. Nulla mauris mauris, ullamcorper sed, pretium nec, semper
			ut, risus. Ut tincidunt erat sed felis. Nam quis wisi sed libero viverra venenatis.</p>
		</div>
	</body>
</html>

=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); }
 
Jeff,

If you change your CSS for the crumbs id to:

Code:
#crumbs {
            background:#339933;
            font:bold 70% sans-serif;
            margin:0px 3% 5px 6%;
            padding:1px 2px 1px 4px;
        }

It seems to solve the problem.

Basically, changing the top margin from -1px to 0px.

No idea why it happens though - just another display glitch, maybe?

BTW - Meta tags don't have close tags, and you have an erroneous close SPAN tag right after
Code:
<div id=&quot;borderStaticTitle&quot;>Home
;o)

Looking good!

Dan
 
Dan,

thanks - i'll try that.

regarding the meta tags, true they don't have content and therefore i could use an xml style empty close />, but i just recently read an article on meta tags being closed this way ruin some search engine rankings. there's no harm in using a close tag - it's still valid xhtml

that orphan span tag must have been missed...i copied/pasted the relevant portions and deleted a section there. good eye!

jeff


=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); }
 
Actually, in XHTML meta tags need to be closed (though Jeff is not using any doctype at the moment - the declaration you have is erroneous and is the same as not being there since it does not provide a link to the .dtd file). They can be either closed with the shorthand property ( />) or the long one (like in Jeffs document).
 
Vragabond,

i think the reason i'm not providing a url to the dtd is to keep IE6 from going into strict mode...is there a better way?

=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); }
 
By specifying .dtd you force the browser to use standard declaration. For IE that means that a few quirks (which cause pages to display differently than in other - standards compliant - browsers) will be turned off which is always good. I do not have any idea why you would not want that. Find some further reading here:

 
IE in strict mode??? That is laugh... IE's &quot;strict mode&quot; still allows all kinds of abuses.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top