Odd little image margin in FF

This is a discussion on "Odd little image margin in FF" within the Web Page Design section. This forum, and the thread "Odd little image margin in FF 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 Jul 24th, 2007, 00:01
Reputable Member
Join Date: Jul 2007
Location: Windsor, ON, Canada
Age: 19
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Odd little image margin in FF

Strange, i know, a glitch in firefox of all things!

I've notice that when firefox renders my images, theres an extra 5-10px on the bottom of the image, which makes the outline bigger and therefore pushes my JS menu down a little too much, so when you try to go onto the menu, you often have to race to it before it disappears, which can be quite annoying. I've tried setting margin and padding to 0 in css, but it's not working.

i've attached a screenshot of what i'm talking about; FF on the left, IE on the right, you'll see what i'm talking about.
Attached Images
File Type: jpg FFonLeft_IEonRight.JPG (13.8 KB, 26 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 Jul 24th, 2007, 08:03
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,777
Thanks: 0
Thanked 15 Times in 15 Posts
Re: Odd little image margin in FF

Try this in your stylesheet...

Quote:
* {margin:0; padding:0;}
Unless you already have it of course! But it is a strange one, as it is usually IE that does that.
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
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 Jul 24th, 2007, 13:50
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Odd little image margin in FF

Unfortunately, margin/padding won't work for this. You need to set the image to a block element (which can cause other problems).

Code: Select all
<img src="this.jpg" class="block" alt="image" />


<style type="text/css">
  img.block {
    display: block;
  }
</style>
I think this is the only way to get rid of the space, but I'm not 100% sure.
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 Jul 24th, 2007, 15:13
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,777
Thanks: 0
Thanked 15 Times in 15 Posts
Re: Odd little image margin in FF

I just noticed that, Ryan. Mabey i should read the post more thorough next time.
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
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 Jul 24th, 2007, 16:42
Reputable Member
Join Date: Jul 2007
Location: Windsor, ON, Canada
Age: 19
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Odd little image margin in FF

Quote:
Originally Posted by Ryan Fait View Post
Unfortunately, margin/padding won't work for this. You need to set the image to a block element (which can cause other problems).

Code: Select all
<img src="this.jpg" class="block" alt="image" />
<style type="text/css">
  img.block {
    display: block;
  }
</style>
I think this is the only way to get rid of the space, but I'm not 100% sure.
nope, unless there's something you can add so they display adjacent to each other
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 Jul 24th, 2007, 16:47
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,777
Thanks: 0
Thanked 15 Times in 15 Posts
Re: Odd little image margin in FF

can you add this and see?

Quote:
white-space: nowrap;
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
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 Jul 24th, 2007, 18:02
Reputable Member
Join Date: Jul 2007
Location: Windsor, ON, Canada
Age: 19
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Odd little image margin in FF

nope, nothing, ah well, thankfully i recently added an actual link to the menu sections so that they take you to an index page.
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 Jul 24th, 2007, 18:05
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Odd little image margin in FF

Yeah ... Ryan's fix should work. Did you add the class="block" to the images in the question?

How about a link then so we can test stuff on our end
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 Jul 24th, 2007, 20:48
Reputable Member
Join Date: Jul 2007
Location: Windsor, ON, Canada
Age: 19
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Odd little image margin in FF

yes, and here (css for page, css for menu)

might just be the JS for the menu
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
firefox, image, margin

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
Web page margin dhall Website Planning 1 Sep 2nd, 2007 04:23
Margin different in IE and Firefox when using float cyberseed Web Page Design 8 Apr 17th, 2007 14:55
Why am I getting a margin when not specified AdRock Web Page Design 4 Mar 14th, 2007 22:06
margin? nasumaru Web Page Design 14 Jan 30th, 2007 21:52
Margin top IE csa Web Page Design 5 Apr 6th, 2006 03:45


All times are GMT. The time now is 21:19.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization 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