Faux Columns Problem - scolling up / down causes part of background image 2 disappear

This is a discussion on "Faux Columns Problem - scolling up / down causes part of background image 2 disappear" within the Web Page Design section. This forum, and the thread "Faux Columns Problem - scolling up / down causes part of background image 2 disappear are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 23rd, 2007, 11:19
Junior Member
Join Date: Apr 2007
Location: N.I.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Question Faux Columns Problem - scolling up / down causes part of background image 2 disappear

Hi All,

I have a problem with my Faux Columns. You can see an example on my live site at www.abipo.com/contact.html

Here you can see 3 sheets of paper (background images) that the content sits on top of. Basically, each 'sheet of paper' is made up of three background images:

1. a top image (both left and right top corners of the page)
2. a middle image (this is tiled vertically in the background behind all the content that is entered to form the main part of the 'page'
3. a bottom image (both bottom corners of the page)

Here is the very simple code that shows how to do this:
Code: Select all
#contentTop{
background: url(Images/ContentTopBGIndex.jpg) no-repeat;
}
#contentMdl{
background: url(Images/ContentMdlBG.gif) repeat-y;
}
#contentBtm{
background: url(Images/ContentBtmBG.gif) no-repeat;
}
The 'sheet of paper' containing the navigation buttons illustrates the problem. When you scroll down to the bottom of the page and then scroll back up again using your browser some of the background image disappears sometimes.

Does anyone have any idea why this is happening and also how to prevent it?

Thanks a million,

/Brian

Last edited by karinne; Apr 23rd, 2007 at 13:16. Reason: Please use [code]...[/code] tags when displaying code!
Reply With Quote

  #2 (permalink)  
Old Apr 23rd, 2007, 11:28
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Faux Columns Problem - scolling up / down causes part of background image 2 disap

I couldn't replicate the problem in FF2.0 or IE 7. What browser are you using?
Reply With Quote
  #3 (permalink)  
Old Apr 23rd, 2007, 12:41
Junior Member
Join Date: Apr 2007
Location: N.I.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Faux Columns Problem - scolling up / down causes part of background image 2 disap

Hi, thanks for replying. I should have said: this only seems to happen in good old IE6...

/Brian
Reply With Quote
  #4 (permalink)  
Old Apr 23rd, 2007, 13:18
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Faux Columns Problem - scolling up / down causes part of background image 2 disap

I don't see a problem in IE6
Reply With Quote
  #5 (permalink)  
Old Apr 23rd, 2007, 13:38
Junior Member
Join Date: Apr 2007
Location: N.I.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Faux Columns Problem - scolling up / down causes part of background image 2 disap

If you scroll down the page to the very bottom of the form (www.abipo.com/contact.html) the navigation buttons will scroll off the top of the screen. Then scroll up again until you see the navigation buttons again. Look for parts of the page disappearing (replaced with a grey horizontal thick line). If you don't see them then, scroll down and up a few times without releasing the mouse button. You should have to scroll no more than a few times to see the problem. I have been able to reproduce the problem easily on my home and work machine under IE6. Can you see it?

Thanks,

/Brian
Reply With Quote
  #6 (permalink)  
Old Apr 23rd, 2007, 13:40
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Faux Columns Problem - scolling up / down causes part of background image 2 disap

Nope ... don't see any problem.
Reply With Quote
  #7 (permalink)  
Old Apr 23rd, 2007, 13:51
Junior Member
Join Date: Feb 2006
Location: Florence - Italy
Age: 22
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Gwayn Send a message via MSN to Gwayn
Re: Faux Columns Problem - scolling up / down causes part of background image 2 disap

On IE 6.0.2 on WinXP SP2 i can see the problem you talk about.
It's like a sector (of 8-10 px height) don't repeat the background just before the menu list.
Can't imagine why but i saw this problem before with IE6, try to save the entire background image as a single file (without cut it in 3) and see if the problem persists, if the problem disappear... well... maybe you'll lose 1ms in loading time but you've resolved.

Bye.


PS:
I've reproduced the problem also on IE7.
It appears in all the pages that you can scroll down, before the solution above try add some overflow:hidden; in the coloumns css. Maybe it's just a matter of clearing the floats.

Last edited by Gwayn; Apr 23rd, 2007 at 14:02.
Reply With Quote
  #8 (permalink)  
Old Apr 23rd, 2007, 14:46
Junior Member
Join Date: Apr 2007
Location: N.I.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Faux Columns Problem - scolling up / down causes part of background image 2 disap

Thanks a lot for your suggestions. I will give both your ideas a go when I get home and post back to let you know how I got on. Thanks again!

/Brian
Reply With Quote
  #9 (permalink)  
Old Apr 24th, 2007, 08:06
Junior Member
Join Date: Apr 2007
Location: N.I.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Faux Columns Problem - scolling up / down causes part of background image 2 disap

Update: Its nothing to do with the image or the size of the image so we can rule that out. The image was 1 pixel in height. I changed that to 300 pixels in height but the problem still occurred.

Will keep lookin'

/Brian
Reply With Quote
  #10 (permalink)  
Old Apr 24th, 2007, 09:40
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Faux Columns Problem - scolling up / down causes part of background image 2 disap

Try adding position: relative; to the div(s) in question. Strangely, that fixes a lot of stupid quirks.
Reply With Quote
  #11 (permalink)  
Old Apr 24th, 2007, 11:35
Junior Member
Join Date: Apr 2007
Location: N.I.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Faux Columns Problem - scolling up / down causes part of background image 2 disap

Found it! For some reason (can't remember why) I had a non-semantic <span> inserted. It was this that was causing the grey stripe to appear.

My markup looked like this:
Code: Select all
          <ul id="navMdl"><span></span>
           <li id="t-index">
             <a href="index.html">
             <span></span>home</a>
           </li>
           <li id="t-about">
             <a href="about.html">
             <span></span>about</a>
           </li>
           <li id="t-services">
             <a href="services.html">
             <span></span>services</a>
           </li>
           <li id="t-questions">
             <a href="questions.html">
             <span></span>questions</a>
           </li>
           <li id="t-contact">
             <a href="contact.html">
             <span></span>contact</a>
           </li> 
         </ul>
I removed the <span> and that sorted it!

/Brian

Last edited by karinne; Apr 24th, 2007 at 12:16. Reason: Please use [code]...[/code] tags when displaying code!
Reply With Quote
  #12 (permalink)  
Old Apr 24th, 2007, 13:48
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Faux Columns Problem - scolling up / down causes part of background image 2 disap

Um. Why was it there in the first place? Very few things should be between anchors. An image are the only thing that comes to mind at the moment.
Reply With Quote
  #13 (permalink)  
Old Apr 24th, 2007, 13:54
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Faux Columns Problem - scolling up / down causes part of background image 2 disap

W3C's validator probably would have caught that Hence the reason why so important to validate your site
Reply With Quote
  #14 (permalink)  
Old Apr 24th, 2007, 13:57
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Faux Columns Problem - scolling up / down causes part of background image 2 disap

Does the validator hiccup at that? I'm too used to doing things my normal way.
Reply With Quote
  #15 (permalink)  
Old Apr 24th, 2007, 14:05
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Faux Columns Problem - scolling up / down causes part of background image 2 disap

Yep ... it does. Try it out. Enter this code

Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-CA" xml:lang="EN-CA">

<head>
    <title>Some title</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    
</head>

<body>
<ul id="navMdl"><span></span>
           <li id="t-index">
             <a href="index.html">
             <span></span>home</a>
           </li>
           <li id="t-about">
             <a href="about.html">
             <span></span>about</a>
           </li>
           <li id="t-services">
             <a href="services.html">
             <span></span>services</a>
           </li>
           <li id="t-questions">
             <a href="questions.html">
             <span></span>questions</a>
           </li>
           <li id="t-contact">
             <a href="contact.html">
             <span></span>contact</a>
           </li> 
         </ul>
</body>
</html>
which was the code provided above and put in the textbox or save it as .html and upload it. First error that comes up ... you guessed it ...

Quote:
  1. Error Line 12 column 21: document type does not allow element "span" here; assuming missing "li" start-tag.<ul id="navMdl"><span></span>
Reply With Quote
  #16 (permalink)  
Old Apr 24th, 2007, 15:35
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Faux Columns Problem - scolling up / down causes part of background image 2 disap

I feel at one with semantics. Patience young Skywalker.
Reply With Quote
  #17 (permalink)  
Old Apr 24th, 2007, 15:59
Junior Member
Join Date: Apr 2007
Location: N.I.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Faux Columns Problem - scolling up / down causes part of background image 2 disap

Lol - you are right of course. I wish I could offer some explanation as to why I put that in there. I left the code for quite a while (several months) and have forgotten the reason. I know that in the past I have used non-semantic spans in order to attach an extra backgound image (as only one background image is allowed per element) and I have also used non-semantic spans for image replacement. However, in this context it just seems wrong and it shouldn't be there. I should have validated first.
Reply With Quote
  #18 (permalink)  
Old Apr 25th, 2007, 00:34
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Faux Columns Problem - scolling up / down causes part of background image 2 disap

Yeah, validating is always a good idea If you need those spans for something, they will be fine around the anchor.
Reply With Quote
Reply

Tags
columns, css, disappears, down, faux, scroll

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
background-image rollover problem ie6 ukstoner Web Page Design 6 Apr 9th, 2008 14:00
[SOLVED] Image links disappear after clicked finalfantasyfanatic Web Page Design 14 Dec 5th, 2007 12:14
[SOLVED] div background image problem in ie Rincewind Web Page Design 7 Nov 30th, 2007 09:30
I still don't get faux columns. pdk Web Page Design 8 May 21st, 2007 10:52
Background Image Problem - Challenge! lgmgroup Web Page Design 2 Jan 23rd, 2007 16:09


All times are GMT. The time now is 07:57.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43