Web Design and Development Forums

Background-Position Causes IE to Scroll

This is a discussion on "Background-Position Causes IE to Scroll" within the CSS Forum section. This forum, and the thread "Background-Position Causes IE to Scroll are both part of the Design Your Website category.


Go Back   Webforumz.com > Design Your Website > CSS Forum

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old May 9th, 2008, 07:46   #1 (permalink)
Junior Member
 
Join Date: Nov 2007
Location: Michigan
Age: 22
Posts: 20
Background-Position Causes IE to Scroll

Here is the page with the problem (note: still going through design and graphics overhaul, so it'll load slow until I get through that phase)

http://www.castbuzz.com/newtest/

On the right side, in IE, if you roll over the links it'll cause the footer of the container to shift down a bit, taking down everything else in the page that's in the background area. It moves it a set amount that is independent of the -29px I have set in the CSS. Here is a copy of the relevant CSS for the entire container and the HTML. Note I am not including the CSS markup for the news loader since I've tested it out as being irrelevant:

HTML
Code: Select all
                <div class="box">
                    <div class="box-bg">
                        <div class="box-info">
                            <div class="maincolumn">
<!--begin main content-->
<!--CODE REMOVED FOR SPACE-->
<!--end main content-->
                            </div>
                            <div class="sidecolumn">
                                <div class="module">
                                    <div class="module-nav"></div>
                                    <div class="module-bg">
                                        <ul id="nav-side">
                                            <li><a href="#" class="latest-s">Latest News and Updates</a></li>
                                            <li><a href="#" class="guides">Program Guides and FAQs</a></li>
                                            <li><a href="#" class="articles">CastBuzz Articles</a></li>
                                            <li><a href="#" class="journal">Website Journal</a></li>
                                        </ul>
                                    </div>
                                    <div class="module-foot"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="box-foot"></div>
                </div>
            </div>
CSS
Code: Select all
/* main box */
#content .box {
    width:960px;
    overflow:hidden;
    clear:both;
}

#content .box-bg { background:url(../images/box-bg.jpg) repeat-y; }

#content .box-info {
    background:url(../images/box-top.jpg) no-repeat;
    width:936px;
    overflow:hidden;
    min-height:150px;
    padding:17px;
}

* html #content .box-info {
    overflow:visible;
    height:150px;
}

.maincolumn {
    float:left;
    width:672px;
    overflow:hidden;
    padding:0;
    position:relative;
}

.sidecolumn {
    float:left;
    width:262px;
    overflow:hidden;
    padding:0;
    position:relative;
}

#content .box-foot {
    background:url(../images/box-foot.png) no-repeat;
    width:960px;
    height:10px;
    margin:0 0 20px 0;
    overflow:hidden;
}

/* sidecolumn module */
.module {
    width:254px;
    overflow:hidden;
    clear:both;
}

.module-foot {
    width:254px;
    height:4px;
    background:url(../images/module-foot.gif) no-repeat;
    margin:0;
    padding:0;
    overflow:hidden;
}

.module-bg { background:url(../images/module-bg.gif) repeat-y; }

.module-nav {
    width:254px;
    height:43px;
    background:url(../images/module-nav-news.jpg) no-repeat;
    margin:0;
    padding:0;
    overflow:hidden;
}

/* nav */
#nav-side {
    width:250px;
    margin:0;
    padding:0 2px 0 2px;
    list-style:none;
    overflow:hidden;
}

#nav-side li {
    float:left;
    position:relative;
}

#nav-side li:hover ul, #nav-side-news li.hover ul { display:block; }

#nav-side li a {
    float:left;
    width:250px;
    height:29px;
    text-indent:-9999px;
}

#nav-side li a.latest { background:url(../images/nav-latest.jpg) no-repeat; }
#nav-side li a.latest:hover { background-position: 0 -29px; }
#nav-side li a.latest-s { background:url(../images/nav-latest.jpg) no-repeat 0 -58px; }

#nav-side li a.guides { background:url(../images/nav-guides.jpg) no-repeat; }
#nav-side li a.guides:hover { background-position: 0 -29px; }
#nav-side li a.guides-s { background:url(../images/nav-guides.jpg) 0 -58px; }

#nav-side li a.articles { background:url(../images/nav-articles.jpg) no-repeat; }
#nav-side li a.articles:hover { background-position: 0 -29px; }
#nav-side li a.articles-s { background:url(../images/nav-articles.jpg) 0 -58px; }

#nav-side li a.journal { background:url(../images/nav-journal.jpg) no-repeat; }
#nav-side li a.journal:hover { background-position: 0 -29px; }
#nav-side li a.journal-s { background:url(../images/nav-journal.jpg) 0 -58px; }
Aerdan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 10th, 2008, 14:39   #2 (permalink)
Moderator
 
spinal007's Avatar
 
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,609
Blog Entries: 1
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: Background-Position Causes IE to Scroll

That's the infamous IE Peek-a-boo bug. This article tells you how to work around it:
http://www.positioniseverything.net/.../peekaboo.html
__________________
Diego - SEO Consultant London (My Blog | Fight Me)
jQuery: Star Rating - Multiple File Upload - FCKEditor/Codepress
Before we work on artificial intelligence why don't we do something about natural stupidity?
spinal007 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 11th, 2008, 01:37   #3 (permalink)
Junior Member
 
Join Date: Nov 2007
Location: Michigan
Age: 22
Posts: 20
Re: Background-Position Causes IE to Scroll

That makes sense, I looked at the code to see what it could be exposing and this is what I found...

The culprit code:

Code: Select all
#content .box-info {
    background:url(../images/box-top.jpg) no-repeat;
    width:936px;
    overflow:hidden;
    min-height:150px;
    padding:17px;
The displacement was 17px, and it fit the bill. When I removed this padding, the problem was solved. For my own CSS, I put the padding within the main and side column CSS code, and no more problem! Thank you!
Aerdan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
DIV Background Won't Scroll Along tomazws CSS Forum 4 Jan 4th, 2008 16:43
CSS - Horizontal Scroll Bar Start Position???? jez CSS Forum 0 Jul 14th, 2007 09:05
scroll does not line up text and background cherishkiss CSS Forum 2 Feb 22nd, 2007 15:40
a:hover and background-position issue with ie6 mezema CSS Forum 5 Jun 15th, 2006 15:32
background-position:bottom; <-- not working ? ifunky2 CSS Forum 2 Feb 14th, 2006 21:56



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 19:22.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59