WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Site Design > Graphics & Design Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-17-2005, 12:18 AM
ADAM Web Design's Avatar
WebProWorld 1,000+ Club
 

Join Date: Dec 2003
Location: Toronto, Ontario, Canada
Posts: 2,217
ADAM Web Design RepRank 0
Default The Randomly Disappearing Header in IE Trick

I've found a rather unusual quirk in IE that I would think is kind of cool if it wasn't so frustrating:

http://216.89.218.233/tmac/disappearing_header.html

Simply put, any time I use a float inside of the content div (left or right, it doesn't seem to matter much), the <h1> tags on the page alternate randomly between being visible and disappearing completely off the page. They start out invisible, but if I drag the cursor over them and/or scroll a page up and down, the headers appear.

I've seen this behaviour about 3 or 4 times on different sites I've worked on in the last little while, and it's all IE-specific.

The question is: how do I deal with this issue save for not using floats and/or putting things into tables that don't really belong (e.g. this list concept)?

Thanks.
Reply With Quote
  #2 (permalink)  
Old 10-17-2005, 06:57 AM
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Cornwall, UK
Posts: 833
speed RepRank 1
Default

What!! a bug in IE and Firefox renders it correctly ;)

The normal fix for IE is to add "position: relative" to either the float, it's container or the element that isn't showing. I don't mean to be vague but it seems to vary.

You can also add "height: 1%" or in some cases giving the containing element a width value will solve it.

Finally if you float the element that is containing the <h1> and floated div then that often fixes the problem as well.

My usual fix is just to add "position: relative"

By the way I couldn't see that bug on that site it all seemed to work in IE.
__________________
TOLRA Micro Systems Limited US & UK Web Hosting with Continuous Data Protection
Web Directory 2 for 1 Offer : Web Directory Script
Reply With Quote
  #3 (permalink)  
Old 10-17-2005, 09:37 AM
MuNKyonline's Avatar
WebProWorld Veteran
 

Join Date: Jun 2004
Location: Suffolk, England
Posts: 790
MuNKyonline RepRank 2
Default

Worked fine for me to!
Reply With Quote
  #4 (permalink)  
Old 10-17-2005, 10:44 AM
ADAM Web Design's Avatar
WebProWorld 1,000+ Club
 

Join Date: Dec 2003
Location: Toronto, Ontario, Canada
Posts: 2,217
ADAM Web Design RepRank 0
Default

speed, I'm a little disappointed in you, dude. You were only half-right, as opposed to being completely right. You're slipping, man. You're slipping. ;)

Okay...seriously...speed, thanks for giving me enough of a clue to solve the problem. I ended up getting it by putting "width=100%" inline for the H1 tags. position: relative and height: 1px; didn't work, but the height idea gave me the width idea, which I ran with.

The weird thing about that solution is that it didn't work within the style sheet itself; it had to be applied inline.

If possible, I'd like to be able to have this as part of the style sheet. If not, though, it's not that big a deal.

Any ideas?
Reply With Quote
  #5 (permalink)  
Old 10-17-2005, 10:48 AM
MuNKyonline's Avatar
WebProWorld Veteran
 

Join Date: Jun 2004
Location: Suffolk, England
Posts: 790
MuNKyonline RepRank 2
Default

I thought speed said height as 1% and not 1px?
Reply With Quote
  #6 (permalink)  
Old 10-17-2005, 10:48 AM
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Cornwall, UK
Posts: 833
speed RepRank 1
Default

um I did mention assigning a width sometimes fixes it.

I'd clear your browser cache as unless you've got some other issues these fixes should all work when placed in the style sheet.

Which page is it exactly as I can't find the problem page.
__________________
TOLRA Micro Systems Limited US & UK Web Hosting with Continuous Data Protection
Web Directory 2 for 1 Offer : Web Directory Script
Reply With Quote
  #7 (permalink)  
Old 10-17-2005, 10:50 AM
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Cornwall, UK
Posts: 833
speed RepRank 1
Default

Quote:
Originally Posted by MuNKy
I thought speed said height as 1% and not 1px?
Actually I did and it does make a difference, I didn't spot that.
__________________
TOLRA Micro Systems Limited US & UK Web Hosting with Continuous Data Protection
Web Directory 2 for 1 Offer : Web Directory Script
Reply With Quote
  #8 (permalink)  
Old 10-17-2005, 10:56 AM
MuNKyonline's Avatar
WebProWorld Veteran
 

Join Date: Jun 2004
Location: Suffolk, England
Posts: 790
MuNKyonline RepRank 2
Default

I'd be interested to see the page also as I can't see what you're referring to. The code you guys are talking about makes sense but i've never seen header tags just dissapear!
Reply With Quote
  #9 (permalink)  
Old 10-17-2005, 11:03 AM
MuNKyonline's Avatar
WebProWorld Veteran
 

Join Date: Jun 2004
Location: Suffolk, England
Posts: 790
MuNKyonline RepRank 2
Default

Hey! It's on that first page that Adam gave as a link. I see what you mean now! That is really odd!
Reply With Quote
  #10 (permalink)  
Old 10-17-2005, 11:21 AM
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Cornwall, UK
Posts: 833
speed RepRank 1
Default

Ah! Now I see it.
Code:
#content {
    padding-left:  3px;
    padding-right:  3px;
    padding-top:  1em;
    padding-bottom:  1em;
    background:  URL(../images/center_bg.gif) center center no-repeat #F2F2FF;
    height: 1%;
}
I've grabbed a partial copy of that page and adding the height: 1% as above fixed it for me.
__________________
TOLRA Micro Systems Limited US & UK Web Hosting with Continuous Data Protection
Web Directory 2 for 1 Offer : Web Directory Script
Reply With Quote
  #11 (permalink)  
Old 10-17-2005, 11:29 AM
MuNKyonline's Avatar
WebProWorld Veteran
 

Join Date: Jun 2004
Location: Suffolk, England
Posts: 790
MuNKyonline RepRank 2
Default

How did you find out about that? That's a pretty clever fix! Nice one speed!
Reply With Quote
  #12 (permalink)  
Old 10-17-2005, 11:51 AM
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Cornwall, UK
Posts: 833
speed RepRank 1
Default

Quote:
Originally Posted by MuNKy
How did you find out about that? That's a pretty clever fix! Nice one speed!
To be honest I've no idea where that fix came from, when I have a problem I tend to keep trying different things based on solutions to other problems.

http://www.positioniseverything.net/ is quite a good source of information.

I probably should have said that if you use the height: 1% fix you might want to make it conditional for IE only, saves the risk of breaking something else.
__________________
TOLRA Micro Systems Limited US & UK Web Hosting with Continuous Data Protection
Web Directory 2 for 1 Offer : Web Directory Script
Reply With Quote
  #13 (permalink)  
Old 10-17-2005, 04:12 PM
DrTandem1's Avatar
WebProWorld 1,000+ Club
 

Join Date: Oct 2003
Location: Encinitas, CA
Posts: 1,908
DrTandem1 RepRank 2
Default

I think it has something to do with the CSS and IE, because when you reload the page, The text appears briefly until the CSS loads, then it disappears.

The way to troubleshoot it would be to take out the attributes for the class and add them one at a time, until the problem appears...or should I say disappears?
__________________
DrTandem's San Diego Web Page Design, drtandem.com
Reply With Quote
  #14 (permalink)  
Old 10-18-2005, 04:00 PM
WebProWorld Veteran
 

Join Date: Aug 2003
Location: California,USA
Posts: 373
drummin RepRank 0
Default

Hey Adam...

Looks like the problem in in your CSS/content id tag.

#content {
padding-left: 3px;
padding-right: 3px;
padding-top: 1em;
padding-bottom: 1em;
background: URL(../images/center_bg.gif) center center no-repeat #F2F2FF;
}
I believe font color is being changed to the same a background color. Remove the color and it works fine.
#content {
padding-left: 3px;
padding-right: 3px;
padding-top: 1em;
padding-bottom: 1em;
background: URL(../images/center_bg.gif) center center no-repeat;
}

Hope that helps.
Drummin
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum
Tags: , , ,



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0