无表格布局 - 仅在PC上出现间隙 [英] Tableless Layout -- Gaps Appear on PC Only
问题描述
我正在深入探索CSS的世界,并被它的力量所震撼。
我正在重新设计一个网站,试图消除布局中的表格>
支持CSS。然而,我只是在使用IE和Netscape的PC上遇到了明显的绊脚石。 (一个巨大的绊脚石。)
问题是我在页面上的图像与
之间的图像和我在< div>内的图像之间出现间隙。作为背景图像。在Mac上
(Firefox 1.0.2,Safari 1.2.4,Netscape 7.2,Opera 7.54)这两个是无缝的
。在PC(IE 6,Netscape 7.1)上出现差距。有没有办法
来消除放置图像和< div>之间的差距。背景
电脑上的图像?
要查看我在说什么,请访问
http://www.sunriveronline.org/misc/clrn (顺便说一下,它在PC上看起来很好
使用FireFox 1.0.3。)
谢谢。
-Fleemo
I''m diving into the world of CSS and am blown away by the power of it.
I''m redesigning a website, trying to eliminate the tables in the layout
in favor of CSS. However I''ve come across a stumbling block evident
only on the PC using IE and Netscape. (A mighty big stumbling block.)
The problem is that a gap appears between an image I have on the page
and an image I have inside a <div> as a background image. On the Mac
(Firefox 1.0.2, Safari 1.2.4, Netscape 7.2, Opera 7.54) the two are
seamless. On the PC (IE 6, Netscape 7.1) a gap appears. Is there a way
to eliminate the gap between the placed image and the <div> background
image on a PC?
To see what I''m talking about, please visit
http://www.sunriveronline.org/misc/clrn (BTW, it looks fine on the PC
using FireFox 1.0.3.)
Thanks.
-Fleemo
推荐答案
< fl ****** @ comcast.net>写了
<fl******@comcast.net> wrote
问题是我在页面上的图像与我在< div>内的图像之间出现间隙。作为背景图像。在Mac上(Firefox 1.0.2,Safari 1.2.4,Netscape 7.2,Opera 7.54)这两者是无缝的。在PC(IE 6,Netscape 7.1)上出现差距。有没有办法消除放置的图像和< div>之间的差距。背景
图像在PC上?
要了解我在说什么,请访问
http://www.sunriveronline.org/misc/clrn (顺便说一句,在PC上看起来很好用
使用FireFox 1.0.3。 )
The problem is that a gap appears between an image I have on the page
and an image I have inside a <div> as a background image. On the Mac
(Firefox 1.0.2, Safari 1.2.4, Netscape 7.2, Opera 7.54) the two are
seamless. On the PC (IE 6, Netscape 7.1) a gap appears. Is there a way
to eliminate the gap between the placed image and the <div> background
image on a PC?
To see what I''m talking about, please visit
http://www.sunriveronline.org/misc/clrn (BTW, it looks fine on the PC
using FireFox 1.0.3.)
对于IE 6,您可以尝试删除< image>之间的所有空白区域。标签
和以下div。
-
peter
For IE 6 you could try removing all the white space between the <image> tag
and the following div.
--
peter
< br>
fl******@comcast.net 写道:
要了解我在说什么,请访问
http:/ /www.sunriveronline.org/misc/clrn (BTW,使用FireFox 1.0.3在
PC上看起来很好。)
To see what I''m talking about, please visit
http://www.sunriveronline.org/misc/clrn (BTW, it looks fine on the
PC using FireFox 1.0.3.)
...或者您可能想尝试在ems中设置间距而不是
像素,并使页面流畅。当我们在它的时候,你需要设置一个
的背景颜色。我看到我丑陋的浅绿色背景显示出来。你每次设置颜色时都应该设置背景颜色。
总是有一个水平滚动条。看看你是否可以解决这个问题。
BTW,保证金:0 0 0 0;只需要保证金:0;
-
-bts
-这个空间故意留空。
...or you might want to try to set your spacing in ems rather than
pixels, and make the page fluid. While we''re at it, you need to set a
background color. I see my ugly aqua background showing through. You
should always set a background color every time you set a color.
There is also always a horizontal scrollbar. See if you can fix that.
BTW, margin: 0 0 0 0; need only be margin: 0;
--
-bts
-This space intentionally left blank.
Peter Hoyle写道:
Peter Hoyle wrote:
< fl ****** @ comcast.net>写了
<fl******@comcast.net> wrote
问题是我在页面上的图像与我在< div>内的图像之间出现间隙。作为背景图像。在Mac上(Firefox 1.0.2,Safari 1.2.4,Netscape 7.2,Opera 7.54)这两者是无缝的。在PC(IE 6,Netscape 7.1)上出现差距。有没有办法消除放置的图像和< div>之间的差距。背景
图像在PC上?
要了解我在说什么,请访问
http://www.sunriveronline.org/misc/clrn (顺便说一句,在PC上看起来很好用
使用FireFox 1.0.3。 )
The problem is that a gap appears between an image I have on the page
and an image I have inside a <div> as a background image. On the Mac
(Firefox 1.0.2, Safari 1.2.4, Netscape 7.2, Opera 7.54) the two are
seamless. On the PC (IE 6, Netscape 7.1) a gap appears. Is there a way
to eliminate the gap between the placed image and the <div> background
image on a PC?
To see what I''m talking about, please visit
http://www.sunriveronline.org/misc/clrn (BTW, it looks fine on the PC
using FireFox 1.0.3.)
对于IE 6,您可以尝试删除< image>之间的所有空白区域。标签
和以下div。
For IE 6 you could try removing all the white space between the <image> tag
and the following div.
这对我的IE6起作用,将div放在与图像相同的一行:
< IMG ... src =" banner.jpg" width = 639>< DIV id = navlist>
Mike
That worked on my IE6, placing the div on the same line as the image:
<IMG ... src="banner.jpg" width=639><DIV id=navlist>
Mike
这篇关于无表格布局 - 仅在PC上出现间隙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!