473,425 Members | 1,560 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,425 software developers and data experts.

Mysterious margin around images in Firefox?

On http://www.wellesleycarriagehouse.com, there is no margin around the
thumbnail images at bottom. I've verified that Firefox doesn't even THINK
there's a margin, using Firebug 0.4.

So why is there space around the images in Firefox 1.5 for Windows?

Jay Levitt
Jul 20 '06 #1
3 2952
Jay Levitt wrote:
On http://www.wellesleycarriagehouse.com, there is no margin around the
thumbnail images at bottom. I've verified that Firefox doesn't even THINK
there's a margin, using Firebug 0.4.

So why is there space around the images in Firefox 1.5 for Windows?
I think you got a "white space bug" problem. Remove the carriage returns
between your <imgelements.

Instead of:

<div id="thumbs">
<img src="images/site/kitchen-thumb.jpg" alt="Kitchen"/>
<img src="images/site/living-room-thumb.jpg" alt="Living Room"/>
<img src="images/site/bedroom-thumb.jpg" alt="Bedroom"/>
<img src="images/site/back-thumb.jpg" alt="Back Yard"/>
</div>

Use:

<div id="thumbs">
<img src="images/site/kitchen-thumb.jpg"
alt="Kitchen"/><img src="images/site/living-room-thumb.jpg"
alt="Living Room"/><img src="images/site/bedroom-thumb.jpg"
alt="Bedroom"/><img src="images/site/back-thumb.jpg"
alt="Back Yard"/>
</div>

Or just put all the <imgelements on one line with no space between the
elements.
Nick

--
Nick Theodorakis
ni**************@hotmail.com
contact form:
http://theodorakis.net/contact.html
Jul 20 '06 #2
Nick Theodorakis schrieb:
Jay Levitt wrote:
>On http://www.wellesleycarriagehouse.com, there is no margin around the
thumbnail images at bottom. I've verified that Firefox doesn't even
THINK
there's a margin, using Firebug 0.4.
So why is there space around the images in Firefox 1.5 for Windows?

I think you got a "white space bug" problem. Remove the carriage returns
between your <imgelements.
Is this a bug? I thought that line breaks between inline elements should
be rendered just as any whitespace? Correct me if there is a kind of
"ignore line breaks and indentation directly after inline elements"
rule; I don't know the Specs by heart... :-)

If you want images to behave like block elements, thus ignoring
baselines and surrounding white space, set them to display:block in the CSS:

#photo img, #thumbs img {
display:block;
float:left;
}
#photo, #thumbs {
clear:left;
}

HTH
Markus
Jul 20 '06 #3
On Thu, 20 Jul 2006 04:02:20 GMT, Nick Theodorakis wrote:
>On http://www.wellesleycarriagehouse.com, there is no margin around the
thumbnail images at bottom. I've verified that Firefox doesn't even THINK
there's a margin, using Firebug 0.4.

So why is there space around the images in Firefox 1.5 for Windows?

I think you got a "white space bug" problem. Remove the carriage returns
between your <imgelements.
Doh! Bingo. It makes sense, as Markus points out - if IMG is inline,
carraige returns become spaces. The proof: setting the font-size to
x-large makes the space bigger!

Thanks a bunch. I knew it had to be something simple.

Jay
Jul 20 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Chris Gurk | last post by:
Hi Newsgroup, I am working on a website http://www.charter-yachtcharter.com/testsite/ (still in progress). There are two lists. The first is a simple paragraph (<p>-Tag), the second an...
7
by: Bob Bedford | last post by:
I've an image in a cell of a table. I've this CSS: ..dbtable{ width: 600px; padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px; border-collapse: collapse; border: 1px solid #000000;
6
by: michaelzap | last post by:
I can't seem to remove some extra margin/padding from my design on this site: http://www.kyowa-usa.com/ IE displays it properly (no space between the menus and other elements and the outer...
0
by: paulroskilly | last post by:
Hello, I have the following css : body { background-color: #CACACA; margin-left: 0px; margin-top: 10px; margin-right: 0px; margin-bottom: 0px;
1
by: Edward | last post by:
I created a simple CSS layout (code and example below) for bloggin/writing but ran into five issues that I need help with: 1. How do I get rid of the right-margin red line on the last three...
11
by: sllrphoto | last post by:
A veteran of early html, I've modified my blog template and made it look rather clean (albeit rather plain) when viewed with IE. Ironically, I'm a big Firefox fan, but when viewed in FF, my blog...
3
by: Daz | last post by:
Hi everyone. I have just been making a JavaScript chat applet, which should open in a new child window. It does all of this fine, and works within Firefox beatifully. However, IE thinks it's...
7
by: GTalbot | last post by:
Hello fellow authoring.stylesheets colleagues, Can someone please explain why the bottom margin of the last inflow block-level child in an overflowed parent should not have its margin reachable....
1
by: innivive | last post by:
I am having a problem with having margins display correctly in IE7, Firefox and Safari. I am not sure if it is the "double margin error" or something else. Any help would be appreciated. The file...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.