Background height problem in FireFox but work in IE

This is a discussion on "Background height problem in FireFox but work in IE" within the Web Page Design section. This forum, and the thread "Background height problem in FireFox but work in IE 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 Mar 15th, 2007, 21:34
New Member
Join Date: Mar 2007
Location: Montreal
Age: 28
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Arrow Background height problem in FireFox but work in IE

Hello,
If this problem has already been addressed, please point me to the correct post(s) for solutions. Thanks.


I am trying to create my site using css and I ran into the problem with background not appearing in Firefox (FF) if height tag is not set but seems to show up fine in IE regardless of height tag set or not.


I am using this css to frame my other divs:


#project_management_frame {
background-image: url(images/interface/bg.gif) !important;
background-repeat: repeat;
background-color: #ffffff;
width: 960px;
height: 100%;
margin: 0px;
padding: 0px;
}


You will notice that I had to set the height property in order for the background to show up in Firefox ("height: 100%;"), however in IE, whether I set the height property or not, the background still appear and appear correctly without adding additional vertical spacing.


The problem with setting the height to 100% is that the height stretches vertically by giving me alot of vertical spaces in FF. And if I remove the height tag, the background image will not show up at all. I can not set the height to pixel size since the height will vary from pages to pages (since I will be using the same layout) and this will mean I will need to create different div for different pages and I do not wish to do that.





You can view this problem here:
http://www.vertabase.com/test/css_help.html
Link to my css:
http://www.vertabase.com/test/projec...t_software.css


How do you solve this problem? It is driving me mad. I have try to research this problem online but came up empty handed and I hope the users here can help me.


Thank you for your help.





Cheers,


Chi.
Reply With Quote

  #2 (permalink)  
Old Mar 15th, 2007, 21:51
BGarner's Avatar
Reputable Member
Join Date: Oct 2006
Location: In front of the computer.
Posts: 213
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background height problem in FireFox but work in IE

I don't see the problem. Both show up beautifully for me.

Try inserting...

Code: Select all
html, body {
height: 100%;
}
...or...

Code: Select all
   #project_management_frame {
     background: #fff url(images/interface/bg.gif) repeat-y;
     width: 960px;
     height: 101%;
     margin: 0; 
     padding: 0;
 }
Reply With Quote
  #3 (permalink)  
Old Mar 15th, 2007, 21:54
BGarner's Avatar
Reputable Member
Join Date: Oct 2006
Location: In front of the computer.
Posts: 213
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background height problem in FireFox but work in IE

You shouldn't need a height attribute though.
Reply With Quote
  #4 (permalink)  
Old Mar 15th, 2007, 22:27
New Member
Join Date: Mar 2007
Location: Montreal
Age: 28
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background height problem in FireFox but work in IE

Hi BGarner,

The following code was already implemented:

html, body {
height: 100%;
}

And I have also removed the height tag but when I removed it, in FF, the background does not show up at all.

I tried implementing your code:
#project_management_frame {
background: #fff url(images/interface/bg.gif) repeat-y;
width: 960px;
height: 101%;
margin: 0;
padding: 0;
}
And that didn't change anything. I still have the same problem.

I understand my css isn't very clean. I am in the process of learning to use tableless tags so my css is a work in progress.

Do you or anyone else here have another solution to fixing the problem?

When you view the site in FF (http://www.vertabase.com/test/css_help.html) do you see the extra vertical space I'm referring to?


Thanks all for any help.


cheers,

Chi.
Reply With Quote
  #5 (permalink)  
Old Mar 16th, 2007, 02:56
New Member
Join Date: Mar 2007
Location: Montreal
Age: 28
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background height problem in FireFox but work in IE

I am using FF version 1.5.0.10, what version of FF are you using?

I am using IE version 6.

Thanks.


Cheers,

Chi.
Reply With Quote
  #6 (permalink)  
Old Mar 16th, 2007, 03:30
New Member
Join Date: Mar 2007
Location: Montreal
Age: 28
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Background height problem in FireFox but work in IE

Hi,

Just to update everyone. I was able to solve the problem by adding "style="display:block; clear:both;" to my image.

See below:
<IMG SRC="images/interface/border_bot.gif" WIDTH="960" HEIGHT="36" BORDER="0" style="display:block; clear:both;">

I also move that image within the <div> of <DIV ID="project_management_frame">

Apparently someone from another forum was able to help me. He show me this link:
http://www.positioniseverything.net/easyclearing.html

Thanks again.


Cheers,

Chi.
Reply With Quote
  #7 (permalink)  
Old Mar 16th, 2007, 22:59
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: Background height problem in FireFox but work in IE

You don't need display: block; in there. Clear will do fine by itself.
Reply With Quote
Reply

Tags
background image, firefox

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
ie 6 background-repeat does not work AndrewChip Web Page Design 3 May 4th, 2008 10:19
javascript working fine in IE but cannot work in Firefox web20tester JavaScript Forum 0 May 21st, 2007 17:37
Javascript Navigation Will Not Work With Firefox cpando1974 JavaScript Forum 2 Apr 1st, 2007 14:56
Firefox and 100% height problem monkey64 Web Page Design 17 Sep 29th, 2006 23:09
colspan doesnt work in IE but does in firefox helen_166 Web Page Design 0 Nov 17th, 2005 14:38


All times are GMT. The time now is 12:53.


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