Advanced Web Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignAdvanced Web Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 11th, 2006, 05:55 AM
florida_guy florida_guy is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 1 florida_guy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 31 sec
Reputation Power: 0
Firefox layout broken by background image - IE works fine

Hi Everyone

This is my first post here and my first post anywhere about web standards.

I am developing my first web standards compliant site and have discovered the solution to a problem I had but would like to understand the issue better.

As far as I know the problem only occurs in Firefox and only on some computers. Actually the only computer I know it occurs on is mine. It doesn't happen at work and it doesn't happen on a friends computer.

On my home computer in Firefox when you click on a link that takes you from one page in the site to another and then go back to the home page the layout breaks. Ctrl-+ or Ctrl- fix it until you click the link again.

The problem is caused by this css for the banner image across the top of the page.

#header #logo {
background-color: #36558E;
background-image: url(baywalk.jpg);
background-repeat: no-repeat;
background-position: left;
width: 1280px;
height: 178px;
}

If the width is set to 1006 or above it breaks on my computer. 1005 or below it works fine.

The image itself is 1280x178 and displays fine on my 1024x768 home machine except for the right part of the image being cut off, of course.

As expected when set to 1005 the right 275px of the header shows the background color not the image.

The code below fixes the problem fine but I read in a book (I believe it was one of Dan Cederholm's) that you should always define the size of your images.

#header #logo {
background-color: #36558E;
background-image: url(baywalk.jpg);
background-repeat: no-repeat;
background-position: left;
/* width: 1006px; */
height: 178px;
}

I'd like to understand what's going on. The 1005/1006 breaking point seems very odd.

Reply With Quote
  #2  
Old March 13th, 2006, 09:22 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
Is it possible to provide a full example (with the html portion as well) that breaks on your computer? Let alone, define breaks... perhaps screenshots? I assume things are shifting unpredictably.

It is true that you should define width and height for your images, but keep in mind that you don't seem to be defining an image. You're using a background, which is very different.

Are you running a different version of Firefox at home than at work/friend's place?


P.S. Dan Cederholm's book rocks =)
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter!
DevArticles Forum Moderator

"The net is a waste of time, and that's exactly what's right about it." -- William Gibson

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignAdvanced Web Development > Firefox layout broken by background image - IE works fine


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT