473,465 Members | 1,747 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Img - bottom margin mystery

Don't know whether anyone might be willing to take a look at a little
CSS problem that's stumping me. There's a page fragment at:

http://www.weatherstations.co.uk/default_test.htm

and the item giving the problem is the clouds image (which has
deliberately been duplicated as a further check.)

The question is why there seems to be a bottom margin of white space
to the clouds image (in IE7 and FF2.0.12 at least) when AFAICS all
the relevant margins, padding etc are set to zero in the stylesheet.

I'd like to try to understand what's generating this specific problem
if anyone can offer an explanation please.

JGD
Mar 30 '08 #1
6 11824
On 2008-03-30, John Dann <ne**@prodata.co.ukwrote:
Don't know whether anyone might be willing to take a look at a little
CSS problem that's stumping me. There's a page fragment at:

http://www.weatherstations.co.uk/default_test.htm

and the item giving the problem is the clouds image (which has
deliberately been duplicated as a further check.)

The question is why there seems to be a bottom margin of white space
to the clouds image (in IE7 and FF2.0.12 at least) when AFAICS all
the relevant margins, padding etc are set to zero in the stylesheet.

I'd like to try to understand what's generating this specific problem
if anyone can offer an explanation please.
It's because imgs are display: inline, so they sit on the baseline like
text, with a bit of space below them for descenders.

Make the img display: block.
Mar 30 '08 #2
Ben C wrote:
On 2008-03-30, John Dann <ne**@prodata.co.ukwrote:
>Don't know whether anyone might be willing to take a look at a little
CSS problem that's stumping me. There's a page fragment at:

http://www.weatherstations.co.uk/default_test.htm

and the item giving the problem is the clouds image (which has
deliberately been duplicated as a further check.)

The question is why there seems to be a bottom margin of white space
to the clouds image (in IE7 and FF2.0.12 at least) when AFAICS all
the relevant margins, padding etc are set to zero in the stylesheet.

I'd like to try to understand what's generating this specific problem
if anyone can offer an explanation please.

It's because imgs are display: inline, so they sit on the baseline like
text, with a bit of space below them for descenders.

Make the img display: block.
Or make the img vertical-align:bottom;

--
Gus
Mar 30 '08 #3
Many thanks for the answers.

On Sun, 30 Mar 2008 15:12:55 -0400, Gus Richter
<gu********@netscape.netwrote:
>
Or make the img vertical-align:bottom;
Seems to work for FF2 but not for IE7 AFAICS.

JGD
Mar 30 '08 #4
On Sun, 30 Mar 2008 21:40:21 +0100, John Dann <ne**@prodata.co.uk>
wrote:
>Seems to work for FF2 but not for IE7 AFAICS.
Whoops - too quick off the mark! It worked immediately on a page
refresh in FF2, but not immediately in IE7. But when I closed IE7
fully and reopened it then it did work. Is the cache for the CSS file
more persistent in IE7 than the cache for the html file?
Mar 30 '08 #5
In article <0g********************************@4ax.com>,
John Dann <ne**@prodata.co.ukwrote:
The question is why there seems to be a bottom margin of white space
to the clouds image (in IE7 and FF2.0.12 at least) when AFAICS all
the relevant margins, padding etc are set to zero in the stylesheet.

I'd like to try to understand what's generating this specific problem
if anyone can offer an explanation please.

<http://tinyurl.com/2x3t8f>

--
dorayme
Mar 30 '08 #6
..oO(John Dann)
>Whoops - too quick off the mark! It worked immediately on a page
refresh in FF2, but not immediately in IE7. But when I closed IE7
fully and reopened it then it did work. Is the cache for the CSS file
more persistent in IE7 than the cache for the html file?
Sometimes you have to force IE to really reload all external resources.
A simple ctrl-r doesn't work always, sometimes you have to press ctrl
and hit the refresh button in the toolbar. At least it worked this way
in IE 6.

Micha
Mar 31 '08 #7

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

Similar topics

1
by: Trent L | last post by:
Hello, I'm having a problem where a style for a <a> tag isn't working in IE: border : 1px solid red; If you use my code below, you'll see what I mean. In IE6 on WinXP, I'm not seeing a red...
3
by: Blacksmith | last post by:
Hi, I'm a CSS noob, and I'm trying to implement a very basic layout but am having problems in certain browsers. Basically, I want a horizontally centred box with a fixed width of 750px, with a...
26
by: meltedown | last post by:
I have 2 left floating divs on a page. Sometime the left side is larger, sometimes the right side is larger. I want the page to have a margin at the bottom of whichever div is the largest. If I...
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...
2
by: Patrick Sullivan | last post by:
Hi people, I've been trying to get the text of a menu list to align at the bottom of a table cell. Can't get to work with html or css and html. Menu should be lined up with bottom right of logo....
3
by: Paul | last post by:
I want the <div id="navigation"column to be the same color all the way to the bottom. The "background-image: url(bg_menu_tile.gif);" was a try to force it with a long 1-pixel graphic - didn't...
16
by: FuzzyLogik | last post by:
By width, I don't mean weight. I have a row of <li>'s, with a bottom-border. I want the bottom-border to only go 90% of the <li> (centered) Is there any way to do this? I have it in this...
2
by: GTalbot | last post by:
www.authoring.html] Hello fellow HTML and markup coder colleagues, Please visit this url: http://www.gtalbot.org/BrowserBugsSection/DefaultTopBottomMarginsForPargDisappear.html I would...
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....
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.