Strange gaps in FF (IE works fine)

This is a discussion on "Strange gaps in FF (IE works fine)" within the Web Page Design section. This forum, and the thread "Strange gaps in FF (IE works fine) are both part of the Design Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old May 25th, 2007, 23:14
Reputable Member
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 245
Thanks: 6
Thanked 0 Times in 0 Posts
Strange gaps in FF (IE works fine)

I'm using tables with CSS to set background images to create a neon frame around individual posts to a message board. In IE, everything looks great, but in FF, I get a very small gap between the top element/image and the two side elements/images. (See the first attachment - the gaps are circled in blue.) Even stranger, this only happens with the top element - not the bottom.

There's a sample page here: http://dhs57.stickpuppy.com/emedley_msgdisplay.php

I've double/triple/googtuple checked the various aspects of this code. The image height is set properly, cellpadding/spacing are set correctly in the table, etc. When I look at it in Firebug, it looks like the top row somehow has a couple of extra pixels of bottom padding, but I don't see anything in my code that would cause that. I have to assume it's a FF bug (unless someone can spot something in my code that I have missed.)

I don't really care what's causing it - I just need to FIX it! I've tried various positioning tricks with negative padding/margins/etc. Nothing seems to work. HELP!!!!
Attached Images
File Type: jpg wtf.jpg (70.7 KB, 19 views)
File Type: jpg padding_added2tr.jpg (55.6 KB, 15 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old May 26th, 2007, 12:08
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Strange gaps in FF (IE works fine)

Donny in that second screenshot in the top right hand column I see 0pt when I know you meant 0px. See if that clears up your spacing.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old May 26th, 2007, 16:36
Reputable Member
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 245
Thanks: 6
Thanked 0 Times in 0 Posts
Re: Strange gaps in FF (IE works fine)

Thanks for the response, Linda.

Nope. Doesn't change a thing. I think "0 pt" is a valid setting and has the same effect as "0 px" but I didn't do that - Firebug did. (It does that. Sticks "0 pt" anywhere that you omit a value and allow the default to be used.)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old May 26th, 2007, 17:14
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Strange gaps in FF (IE works fine)

Well I'm shooting int he dark here because I don't have your graphics and can't see what the design is really doing.
Code: Select all
<td rowspan="4" class="em-neonside"><img src="img/neonframe-pink-side.gif" height="1" width="18"></td>
            <td colspan="2"><p class="em-posttime">On Thursday, April 29, 2007 at 8:18 PM</p>
            <td rowspan="4" class="em-neonside"><img src="img/neonframe-pink-side.gif" height="1" width="18"></td>
Try deleting from this code the portion that say height="1" in the two places.
See if that isn't putting in a space of some sort.

Let me know I'm around awhile and can place somemore.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old May 26th, 2007, 17:16
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Strange gaps in FF (IE works fine)

Also try this
Code: Select all
<td height="18" colspan="4"><img class="em-frametop" src="img/neonframe-pink-top.gif" height="18" width="472"></td>
add the part in red. It maybe a situation where the cellrow does not have a specified height.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old May 26th, 2007, 17:22
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,668
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
Re: Strange gaps in FF (IE works fine)

Try the following (if you haven't yet):
table, tr, td, img - line-height, padding, margin

ie.: table, tr, td, img{ line-height:1.0em; padding:0; margin:0; }
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)

Last edited by spinal007; May 26th, 2007 at 17:25.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old May 26th, 2007, 17:25
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,668
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
Re: Strange gaps in FF (IE works fine)

and what's up with this????
font-size:100.01%;
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old May 27th, 2007, 00:23
Reputable Member
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 245
Thanks: 6
Thanked 0 Times in 0 Posts
Re: Strange gaps in FF (IE works fine)

Quote:
Originally Posted by spinal007 View Post
and what's up with this????
font-size:100.01%;
From http://www.communitymx.com/content/a...F76&print=true
Quote:
This odd 100.01% value for the font size compensates for several browser bugs. First, setting a default body font size in percent (instead of em) eliminates an IE/Win problem with growing or shrinking fonts out of proportion if they are later set in ems in other elements. Additionally, some versions of Opera will draw a default font-size of 100% too small compared to other browsers. Safari, on the other hand, has a problem with a font-size of 101%. The current "best" suggestion is to use the 100.01% value for this property.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old May 27th, 2007, 00:27
Reputable Member
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 245
Thanks: 6
Thanked 0 Times in 0 Posts
Re: Strange gaps in FF (IE works fine)

Quote:
Originally Posted by Lchad View Post
Well I'm shooting int he dark here because I don't have your graphics and can't see what the design is really doing.
There's a link to the page in my first post.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old May 27th, 2007, 00:39
Reputable Member
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 245
Thanks: 6
Thanked 0 Times in 0 Posts
Re: Strange gaps in FF (IE works fine)

Quote:
Originally Posted by Lchad View Post
Also try this
Code: Select all
<td height="18" colspan="4"><img class="em-frametop" src="img/neonframe-pink-top.gif" height="18" width="472"></td>
add the part in red. It maybe a situation where the cellrow does not have a specified height.
The part in red was already there. The image height is actually 20, so I fixed that, but it didn't change anything. Then I saw that you had added a height setting to <td> so I added that. (Added it to the preceding <tr> for good measure, too.) None of that helps.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old May 27th, 2007, 00:40
Reputable Member
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 245
Thanks: 6
Thanked 0 Times in 0 Posts
Re: Strange gaps in FF (IE works fine)

Quote:
Originally Posted by spinal007 View Post
Try the following (if you haven't yet):
table, tr, td, img - line-height, padding, margin

ie.: table, tr, td, img{ line-height:1.0em; padding:0; margin:0; }
Tried it. Didn't fix it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old May 27th, 2007, 00:44
Reputable Member
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 245
Thanks: 6
Thanked 0 Times in 0 Posts
Re: Strange gaps in FF (IE works fine)

Quote:
Originally Posted by Lchad View Post
Try deleting from this code the portion that say height="1" in the two places.
See if that isn't putting in a space of some sort.
That is the actual image height. Those images are used (in the css) as background images with a repeat-y so that they stretch vertically to fill the side cells. After I read what you wrote, it occurred to me that displaying the images in the cells like that was superfluous since I was already using them as the bg images in the css. So I removed those two img tags entirely.

Didn't fix the problem.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old May 27th, 2007, 01:26
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Strange gaps in FF (IE works fine)

Donny why do you always have the hard ones???
I'll have another look tomorrow if no one else comes through for ya!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14  
Old May 27th, 2007, 01:46
Reputable Member
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 245
Thanks: 6
Thanked 0 Times in 0 Posts
Re: Strange gaps in FF (IE works fine)

I dunno. I guess I somehow manage to figure out the easy ones on my own!

Thanks, Linda!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #15  
Old May 27th, 2007, 02:17
Reputable Member
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 245
Thanks: 6
Thanked 0 Times in 0 Posts
Re: Strange gaps in FF (IE works fine)

Well, I'm still convinced it's an FF bug (and not something in my code), but I have figured out this spiffy workaround...
Code: Select all
.em-frametop {
    margin-bottom:-2px;
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #16  
Old May 27th, 2007, 12:23
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,668
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
Re: Strange gaps in FF (IE works fine)

Found a solution, instead of a cell with an image, (which you shouldn't be doing anyway), set the image as the background for the cell. Then I'm sure your problems with go away...
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #17  
Old May 27th, 2007, 14:45
Reputable Member
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 245
Thanks: 6
Thanked 0 Times in 0 Posts
Re: Strange gaps in FF (IE works fine)

You're right! That's a much more elegant solution - and it works without a workaround. Many thanks, Diego!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #18  
Old May 27th, 2007, 18:31
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Strange gaps in FF (IE works fine)

OH my gosh, I can't believe I didn't think of that. That is how I did tables for years!!! I think since I started handcoding I'm already getting rusty in tables!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #19  
Old May 28th, 2007, 15:31
spinal007's Avatar