Solved

Problem with truncated background image using Firefox's scrollbar

Posted on 2010-09-03
3
447 Views
Last Modified: 2012-05-10
Hi,

I have a strange truncated background image problem using Firefox. This works fine in IE.

Currently, I have one DIV with the background image set on it (this is to render the header). It looks fine but the problem happened if I resize Firefox using its scrollbar. Below are the steps on how to reproduce it.

1. Resize (drag-and-drop) Firefox to smaller window. The scrollbar in Firefox will be displayed at the bottom of the browser.
2. Then, using the Firefox's scrollbar at the bottom of the page, move the scrollbar to the center and etc.
3. You can see that the header is truncated. Please refer to the attached file.

Any idea on how to fix this?

Thanks
David
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
<head>

<style type="text/css">
body {
	font-family:Tahoma, Geneva, sans-serif;
	font-size:12px;
}

#header-wrapper {	
	width:100%;
	background-image:url(header.jpg);
	background-repeat:repeat-x;
	height:112px;
}

#header-inner{
	width:1070px;
}
	

</style>
</head>

<body>
	<div id="header-wrapper">
  		<div id="header-inner">
    		<div id="part_1">
				dasfads				
			</div>

    		<div id="part_2">
				asfasdf
    		</div>
    		<div class="clear"></div>
  		</div>

	</div>
</body>
</html>

Open in new window

firefox-scrollbar.png
0
Comment
Question by:suprapto45
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
Zado earned 500 total points
Comment Utility
You just need to add 'min-width:1070px;' in #header-wrapper:
#header-wrapper {       
        width:100%;
        background-image:url(header.png);
        background-repeat:repeat-x;
        height:112px;
	min-width:1070px;
}

Open in new window

0
 
LVL 16

Author Closing Comment

by:suprapto45
Comment Utility
Awesome.
0
 
LVL 8

Expert Comment

by:Zado
Comment Utility
Thanks for points :-)
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now