Go Back   SitePoint Forums > Forum Index > Design Your Site > Web Page Design > CSS
Newsletter FAQ Members List Calendar Mark Forums Read

New to SitePoint Forums? Register here for free!

SitePoint Sponsor
 
Reply
 
Thread Tools Display Modes
Old Nov 30, 2005, 06:01   #1
theboypayne
SitePoint Member
 
Join Date: Oct 2005
Location: Leeds
Posts: 8
Bizzare IE6 replicating content issue!

Hi there,
I've got a strange situation where IE is replicating content inside a <div> and placing it below the element in question!

Take a look in IE :

http://www.leger.co.uk:8090/battlefields/index.aspx

I thought this might be a case of changing floats/clears in the CSS but it's not that simple, as IE is actually displaying the text twice, inside and outside the <div>!

Bizzare hey?!

Any ideas guys?

CSS and HTML below, thanks in advance!



--------------------------------------

<div class="selwrap right byp">
<div class="seltop"><h2>D-Day Dakota Experience &amp; Operation Overlord</h2></div><!-- End btop div -->
<div class="selmid">
<a href="fdk.aspx">D-Day Dakota Experience &amp; Operation Overlord</a>
</div>
<!-- End brolink div -->
<div class="selbott"></div><!-- End bbottom div -->
</div><!-- End bwrap div -->

--------------------------------------





/*
CSS Document
Last updated by: Dru Hill
Last updated date: 04 November 2005
Copyright: Leger Holidays
*/


/********************************** Battlefields selection boxes **********************************/

.left{
width:201px;
margin:0px 10px 10px 0px;
padding:0;
float:left;
}

.right{
width:201px;
margin:0px 0px 10px 0px;
padding:0;
float:left;
}

.seltop{
height:34px;
overflow:hidden;
}

.seltop h2{
text-indent:-9999px;
margin:0;
padding:0;
}

.selmid{
/*Height needs to be specified because of ie - it acts like a min-height so the box does not shrink below this size.*/
height:56px;
padding-left:10px;
padding-right:80px;
padding-top:4px;
overflow: hidden;
clear: none;
}

/*This hack is just for firefox - it needs this to make the div resize if the text is made bigger.*/
div[class] .selmid{
min-height:56px;
height:auto;
}

#content a {
font-size:1.1em;
color: #333;
text-decoration:none;
}

#content a:link, #content a:visited{
font-size:1.1em;
color: #333;
text-decoration:none;
}

#content a:hover, #content a:active{
font-size:1.1em;
color: #333;
text-decoration: underline;
}

.selbott {
height:14px;
overflow:hidden;
}

/********************************** **********************************/

------------------------------------------------
theboypayne is offline   Reply With Quote
Old Nov 30, 2005, 06:04   #2
LinhGB
SitePoint Mentor
 
LinhGB's Avatar
 
Join Date: Apr 2004
Location: Melbourne, Australia
Posts: 903
I was speechless the 1st time I saw that bug too.

http://www.positioniseverything.net/...haracters.html

Removing your HTML comments (esp in the floating divs) is one way to fix it.
LinhGB is offline   Reply With Quote
Old Nov 30, 2005, 06:27   #3
theboypayne
SitePoint Member
 
Join Date: Oct 2005
Location: Leeds
Posts: 8
Wow, how strange is that!

Many, many thanks for that LinhGB! My team were losing their minds with this!

Just for info if anybody else comes across this, here's the URL with the answer:

http://www.positioniseverything.net/...haracters.html

I tried removing my html comments, but with little joy.

However, applying a margin of -3px to the right floating div did the trick!

theboypayne is offline   Reply With Quote
Old Nov 30, 2005, 06:22   #4
all4nerds
Non-Member
 
Join Date: Jan 2005
Location: Netherlands
Posts: 4,302
Hello

position relative, a haslayout problem in IE

.r{position:relative;}

<a href="fdk.html" class="r">D-Day Dakota Experience &amp; Operation Overlord</a>
all4nerds is offline   Reply With Quote
Old Nov 30, 2005, 16:16   #5
LinhGB
SitePoint Mentor
 
LinhGB's Avatar
 
Join Date: Apr 2004
Location: Melbourne, Australia
Posts: 903
No worries. That is my pet IE bug hehehe (gotta love that browser). The weirdest thing is that the duplicated "characters" cannot be selected as normal text. They appear as an image (or almost like one) instead. The -3px margin didn't work for me in my case, but removing the comments did.
LinhGB is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread | Next Thread »

Thread Tools
Display Modes

 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Sponsored Links
 
Forum Jump


All times are GMT -7. The time now is 15:38.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright 1998-2009, SitePoint Pty Ltd. All Rights Reserved