Web Design Forum  
 
Go Back   Web Design Forum > Web and Graphic Design > Web Design

Reply
 
LinkBack Thread Tools Display Modes
Old 05-30-2009, 04:12 PM   #1
New Member
 
Join Date: May 2009
Posts: 11
Default Problem with banner graphic in FF

Hi guys, I was wondering if anyone could help me with a strange problem I'm having with displaying a banner graphic in firefox. Forgive me if this is a stupid question, I'm relatively new to web design.

I want the banner graphic to span the entire width of my content area. The content area is 900px wide and the graphic is 900px wide, yet in FF there is a 1px space on the left edge. In other browsers like IE7 and Safari, it displays perfectly. I've attached a screenshot.

Does anyone have any theories about why this is happening only in FF? Thank you.

Here is the section of code and some CSS rules. Above this section is all the code for my header and navigation bar. The "contentWrapper" div is for the textured background graphic; the "content" div is a 900px wide div that holds all the body content of the page; the "container" div is just there so it's background graphic creates a faux column for the sidebar that always goes down to the bottom of the page regardless of the amount of content in the sidebar; and the "mainContent" div obviously contains all the text on the page. Hopefully that makes sense.

Code:
<div id="contentWrapper">
  <div id="content">
    <img src="_images/banner_studies.jpg" alt="studies section banner" width="900" height="150" class="subBanner" />
    <div id="container">
      <div id="mainContent">
        <h1>articles</h1>
Code:
.subBanner {
	margin-bottom: 20px;
}
#contentWrapper {
	background-image: url(../_images/texturebg.jpg);
	background-repeat: repeat-y;
	background-position: center;
}
#content {
	background-color: #e6e0d4;
	width: 900px;
	margin: 0 auto;
	text-align: left;
}
#container {
	float: left;
	background:url(../_images/subnav_body.gif) repeat-y top right;
	width: 900px;
}

#mainContent {
	float: left;
	width: 600px;
	padding: 0 0 20px 25px;
}
Possibly relevant:
Code:
* {
	margin: 0px;
	padding: 0px;
}
#navWrapper {
	background-image: url(../_images/mainnavbg.jpg);
	text-align: left;
	height: 32px;
	border-bottom: 1px solid #453b23;
}
#nav {
	width: 900px;
	margin: 0 auto;
	list-style: none;
	line-height: 32px;
}
Attached Images
 
jvnderwe is offline   Reply With Quote


Old 05-31-2009, 02:57 AM   #2
Silver Member
 
AusQB's Avatar
 
Join Date: Jul 2008
Location: Perth, Australia
Posts: 167
Send a message via AIM to AusQB Send a message via MSN to AusQB Send a message via Skype™ to AusQB
Default

Two options:

1. Add border: 0; to the reset elements

2. Change from an image to a div with a background image


That's all I can really think of. If you've uploaded the site can you give us a url. It's much easier to diagnose if I can view it in the browser.
__________________
RGG Web Designs
AusQB is offline   Reply With Quote
Old 05-31-2009, 04:31 AM   #3
Silver Member
 
adamblan's Avatar
 
Join Date: Aug 2008
Location: Lake Tahoe
Posts: 235
Default

have you tried

html, body {
margin: 0px;
padding: 0px;
}

?
__________________
<ablank.us>
adamblan is offline   Reply With Quote
Old 05-31-2009, 04:09 PM   #4
New Member
 
Join Date: May 2009
Posts: 11
Default

I tried the suggestions above but nothing worked. I did finally discover the problem though. I made that textured background image with a 900px space in the middle where the content would go, but for some reason firefox (and only firefox) was placing the image 1px too far to the left leaving a space. So I remade the background image and moved the left side over 1px so there is now only a 899px space, and there is no gap in any browser. Thanks for the help.
jvnderwe is offline   Reply With Quote
Reply

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



All times are GMT. The time now is 05:16 AM.


Camera Forum - Computer Forum - Web Design Forum

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.