471,066 Members | 1,227 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Tableless Layout -- Gaps Appear on PC Only

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

Jul 21 '05 #1
21 2679
<fl******@comcast.net> wrote
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.)


For IE 6 you could try removing all the white space between the <image> tag
and the following div.

--
peter

Jul 21 '05 #2
fl******@comcast.net wrote:
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.)


...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.
Jul 21 '05 #3
Peter Hoyle wrote:
<fl******@comcast.net> wrote
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.)


For IE 6 you could try removing all the white space between the <image> tag
and the following div.


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
Jul 21 '05 #4
>For IE 6 you could try removing all the white space between the
<image> tag
and the following div.<

Excellent Peter, Mike! That did the trick! Thank you very much!
You should always set a background color every time you set a color. <
Beau, I'm not sure I follow you there. I added a background-color:
#fff; to my body tag. Is that what you had in mind?
There is also always a horizontal scrollbar. See if you can fix that.

<

I'm kind of stumped as to what's causing the horizontal scrollbar. I do
have a 1-pixel image tiling horizontally in the background so that the
header bar will appear to stretch to whatever width the user's browser
is set to. Perhaps that's what's causing the scroll bars?

Thanks for the help here, folks.

-Fleemo

Jul 21 '05 #5
fl******@comcast.net wrote:

[Beauregard wrote:]
You should always set a background color every time you set a
color.


Beau, I'm not sure I follow you there. I added a background-color:
#fff; to my body tag. Is that what you had in mind?


Yes, that was it. No more aqua. A trick for developers is to set an
obnoxious default background color in your browser, to see what you've
missed. You'll be surprised how many places around the WWW this is
forgotten. The reason is, if a visitor has set a bg to, say, black,
and you have black text ... well, the page is just dark and empty.

When/if you set color: on other elements, you could/should also set
background: transparent;
There is also always a horizontal scrollbar. See if you can fix
that.


I'm kind of stumped as to what's causing the horizontal scrollbar.
I do have a 1-pixel image tiling horizontally in the background so
that the header bar will appear to stretch to whatever width the
user's browser is set to. Perhaps that's what's causing the scroll
bars?


Could be. Remove it and see if the problem goes away.

--
-bts
-This space intentionally left blank.
Jul 21 '05 #6

fl******@comcast.net wrote:

<snip>
There is also always a horizontal scrollbar. See if you can fix that.


I'm kind of stumped as to what's causing the horizontal scrollbar. I do
have a 1-pixel image tiling horizontally in the background so that the
header bar will appear to stretch to whatever width the user's browser
is set to. Perhaps that's what's causing the scroll bars?


To find it I just started plugging this line into the various elements,
it showed up right away:

border: 1px solid red;
#navlist {
FONT-SIZE: 0.8em;
LEFT: 120px;
MARGIN: 0px;
/* WIDTH: 100%; */
POSITION: absolute;
TOP: 114px;
}

In my IE6 the nav menu text is quite small, I'd take a look at it and
consider making it at least 1em;

Mike
Jul 21 '05 #7
Man you guys are good! Mike, that solved the scroll bar problem. And
thanks for the tips, Beau.

-Fleemo

Jul 21 '05 #8
After serious contemplation, on or about Monday 18 April 2005 8:31 pm
a.*********@example.invalid wrote:
fl******@comcast.net wrote:

[Beauregard wrote:]
You should always set a background color every time you set a
color.
Beau, I'm not sure I follow you there. I added a background-color:
#fff; to my body tag. Is that what you had in mind?


Yes, that was it. No more aqua. A trick for developers is to set an
obnoxious default background color in your browser, to see what you've
missed. You'll be surprised how many places around the WWW this is
forgotten. The reason is, if a visitor has set a bg to, say, black,
and you have black text ... well, the page is just dark and empty.


Are there any hard statistics on how many users change style in their web
browsers? I hear it oft repeated on this newsgroups, but it doesn't seem
to be much of an issue on most CSS forums.

The reason I am asking is that I have never known anyone personally that
even changed the font style or size in a browser, let alone any style
attributes but I read here that most poster seem to think almost everbody
does it.

I think the norm would be that people wish to view a web page the way the
author laid it out. If it was too horrible, just skip it.
When/if you set color: on other elements, you could/should also set
background: transparent;
There is also always a horizontal scrollbar. See if you can fix
that.


I'm kind of stumped as to what's causing the horizontal scrollbar.
I do have a 1-pixel image tiling horizontally in the background so
that the header bar will appear to stretch to whatever width the
user's browser is set to. Perhaps that's what's causing the scroll
bars?


Could be. Remove it and see if the problem goes away.


--
Later,
Darrell Stec da*****@neo.rr.com

Webpage Sorcery
http://webpagesorcery.com
We Put the Magic in Your Webpages
Jul 21 '05 #9
On Mon, 18 Apr 2005, Darrell Stec wrote:
a.*********@example.invalid wrote:
Yes, that was it. No more aqua. A trick for developers is to set an
obnoxious default background color in your browser, to see what you've
missed. You'll be surprised how many places around the WWW this is
forgotten. The reason is, if a visitor has set a bg to, say, black,
and you have black text ... well, the page is just dark and empty.
Are there any hard statistics on how many users change style in
their web browsers?


No. But when there's a right and a wrong way, why waste time trying
to find excuses for doing it wrong?
I hear it oft repeated on this newsgroups, but it doesn't seem
to be much of an issue on most CSS forums.
That's because we deal with discerning users, instead of
the unthinking masses. SCNR.
The reason I am asking is that I have never known anyone personally
that even changed the font style or size in a browser,
Then you've led a very sheltered life.
attributes but I read here that most poster seem to think almost
everbody does it.
If there's a right and a wrong way to compose pages, the right way
works for both sorts of user, the wrong way only works for the
unthinking masses, then why waste time trying to find excuses for
doing it wrong?

One might almost suspect you're trying to punish those who know how to
use their browsers.
I think the norm would be that people wish to view a web page the
way the author laid it out.


That's a bit of a simplistic idea when you take into account the wide
range of browsing situations in which web pages are needed to work.

CSS is a great idea: it covers cascading with the *user's*
requirements too. It does that for a reason. If you don't know what
that reason is, don't be too hasty to dismiss it.
Jul 21 '05 #10
After serious contemplation, on or about Tuesday 19 April 2005 3:29 am
fl*****@ph.gla.ac.uk wrote:
On Mon, 18 Apr 2005, Darrell Stec wrote:
a.*********@example.invalid wrote:
> Yes, that was it. No more aqua. A trick for developers is to set an
> obnoxious default background color in your browser, to see what you've
> missed. You'll be surprised how many places around the WWW this is
> forgotten. The reason is, if a visitor has set a bg to, say, black,
> and you have black text ... well, the page is just dark and empty.
Are there any hard statistics on how many users change style in
their web browsers?


No.

Thanks, you've answered my question. That is what I thought -- snob appeal.
But when there's a right and a wrong way, why waste time trying
to find excuses for doing it wrong?
I hear it oft repeated on this newsgroups, but it doesn't seem
to be much of an issue on most CSS forums.
That's because we deal with discerning users, instead of
the unthinking masses. SCNR.


Snob appeal. You just finished writing the unthinking masses, who just
happen to be the target audience and most of the Internet browsing
audience. It would seem to make as much sense as programming for Netscape
1.0 or Internet Explorer 1.0 than those few expert programmers who might
change their own browsers. Even browsers such as Netscape 3 and 4 or IE 3
or 4 probably have less than a handful or users. How much time should one
use to make them aperate like their modern descendants?

The reason I am asking is that I have never known anyone personally
that even changed the font style or size in a browser,


Then you've led a very sheltered life.

That I doubt tremendously.
attributes but I read here that most poster seem to think almost
everbody does it.
If there's a right and a wrong way to compose pages, the right way
works for both sorts of user, the wrong way only works for the
unthinking masses, then why waste time trying to find excuses for
doing it wrong?


And who decided it was the "right way?" It seems this newsgroup is the only
place that has voted on the issue.
One might almost suspect you're trying to punish those who know how to
use their browsers.


Which includes by your own definition almost nobody. Why program for the
selected few?
I think the norm would be that people wish to view a web page the
way the author laid it out.


That's a bit of a simplistic idea when you take into account the wide
range of browsing situations in which web pages are needed to work.

CSS is a great idea: it covers cascading with the *user's*
requirements too. It does that for a reason. If you don't know what
that reason is, don't be too hasty to dismiss it.


This idea seems to lie exclusively with posters to this board. It does not
seem to be the consensus of other CSS or web design forums. But thanks for
answering the question.

--
Later,
Darrell Stec da*****@neo.rr.com

Webpage Sorcery
http://webpagesorcery.com
We Put the Magic in Your Webpages
Jul 21 '05 #11
On Tue, 19 Apr 2005, Darrell Stec wrote:
Even browsers such as Netscape 3 and 4 or IE 3 or 4 probably have
less than a handful or users. How much time should one use to make
them aperate like their modern descendants?
Evidently you have no concept of the principle of graceful fallback.
Nobody's suggesting the NS3 can be made to behave like a modern
WWW-compatible browser (nor even like the wretched mass-market
operating system component which the majority have been fooled into
believing to be a web browser - but that's changing).

But if there's a choice of techniques: one of which produces the
desired result on modern browsers in typical browsing situations,
while still presenting the content usefully on older browsers; the
other of which falls into snivelling confusion on the older browsers;
then I know which one I'm going to prefer. And in that sense, I say,
if there's a right way and a wrong way (to communicate the content to
the widest range of potential users, which is what many of us consider
the web to be for) then I don't know why you seem to feel it's SO
important to promote the idea of choosing that wrong way.

Sure - sometimes you *need* to do things which by their very nature
can't work on NN4 or whatever you consider your last-resort browser to
be. Then you really do have to take that value judgment whether it's
worth providing alternative content (images of Hebrew, say, instead of
proper markup). But I don't see any reason to go seeking out such
exclusionary techniques ("yar boo get a proper browser" kind of stuff)
when the content itself contains not the slightest justification for
it.

I'll even accommodate MSIE, despite its violations of mandatory
interworking requirements. Isn't that enough for you?
Why program for the selected few?


I fully agree with what you say. Unfortunately you don't seem to be
aware of what it means. So do your authoring *for* the WWW, of which
the "selected few" (as you choose to call them) are *also* a part. Not
"for" a minority, no; but "for" the web, with all of its different
minorities which together make up the whole.

More to the point, why "program" (your rather instructive choice of
term) to exclude a portion of your potential audience, when there's a
way that encompasses not only your chosen mass market, but lots of
different minorities too?
CSS is a great idea: it covers cascading with the *user's*
requirements too. It does that for a reason. If you don't know
what that reason is, don't be too hasty to dismiss it.


This idea seems to lie exclusively with posters to this board.


Giggle. Condemned out of your own keyboard.
Jul 21 '05 #12
Darrell Stec wrote:
Are there any hard statistics on how many users change style in
their web browsers? I hear it oft repeated on this newsgroups, but
it doesn't seem to be much of an issue on most CSS forums.

The reason I am asking is that I have never known anyone personally
that even changed the font style or size in a browser, let alone
any style attributes but I read here that most poster seem to think
almost everbody does it.


I discovered this "setting background" a few years ago when I released
a new version of a site, asked a friend to have a look, and he replied
"how come there are no links?"

Turned out he had changed his link color to white - purely by accident
- and could not see my undefined (color) links.

Since then, I set both fore- and background colors. No problems since.

Also, everyone I've ever trained or given advice to, knows how to
change font sizes when they arrive at the site of an author who thinks
10px is kewl.

--
-bts
-This space intentionally left blank.
Jul 21 '05 #13
In article <3c*************@individual.net>,
Darrell Stec <da**********@webpagesorcery.com> wrote:
}After serious contemplation, on or about Monday 18 April 2005 8:31 pm a.*********@example.invalid wrote:
}> fl******@comcast.net wrote:
}> [Beauregard wrote:]
}>>> You should always set a background color every time you set a color.
}>>
}>> Beau, I'm not sure I follow you there. I added a background-color:
}>> #fff; to my body tag. Is that what you had in mind?
}>
}> Yes, that was it. No more aqua. A trick for developers is to set an
}> obnoxious default background color in your browser, to see what you've
}> missed. You'll be surprised how many places around the WWW this is
}> forgotten. The reason is, if a visitor has set a bg to, say, black,
}> and you have black text ... well, the page is just dark and empty.
}
}Are there any hard statistics on how many users change style in their web
}browsers? I hear it oft repeated on this newsgroups, but it doesn't seem
}to be much of an issue on most CSS forums.
}
}The reason I am asking is that I have never known anyone personally that
}even changed the font style or size in a browser, let alone any style
}attributes but I read here that most poster seem to think almost everbody
}does it.
}
}I think the norm would be that people wish to view a web page the way the
}author laid it out. If it was too horrible, just skip it.

I doubt that it is really possible to collect any hard
statistics on this. But I can say that I do change the
default text size on my browser (to make it larger) and
find that a lot of sites break rather badly when I do so.
But, if I am to use the site, the text must be large enough
to read.

I rarely change colors, only if a site's own colors make it
way too hard to read.

I don't change other styles - too difficult to do.
--
= Eric Bustad, Norwegian bachelor programmer
Jul 21 '05 #14
Darrell Stec wrote:
After serious contemplation, on or about Tuesday 19 April 2005 3:29 am
fl*****@ph.gla.ac.uk wrote:

If there's a right and a wrong way to compose pages, the right way
works for both sorts of user, the wrong way only works for the
unthinking masses, then why waste time trying to find excuses for
doing it wrong?


And who decided it was the "right way?"


May I ask why you are so antagonistic about setting both background and
foreground colors in your stylesheet? You make it sound like it causes
you undue hardship or something.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 21 '05 #15
After serious contemplation, on or about Tuesday 19 April 2005 11:58 am
us****@c-net.us wrote:
Darrell Stec wrote:
After serious contemplation, on or about Tuesday 19 April 2005 3:29 am
fl*****@ph.gla.ac.uk wrote:

If there's a right and a wrong way to compose pages, the right way
works for both sorts of user, the wrong way only works for the
unthinking masses, then why waste time trying to find excuses for
doing it wrong?


And who decided it was the "right way?"


May I ask why you are so antagonistic about setting both background and
foreground colors in your stylesheet? You make it sound like it causes
you undue hardship or something.


Sorry if my post didn't make it clear. I was writing dressing things like
"never give font sizes" or "never use Verdana. based on the assumpton that
a majority of the audience has custom stylesheets and/or font color/size
alterations in their browser. Some here seem rather dogmatic about that
which I thought was rather didactic and I wondered if any hard evidence
existed for supporting something that seemed so much like an ultimatum. As
I wrote I was unaware of any real evidence that backed the position, and
believed it to be the conjecture by a few knowledgeable programmers.

--
Later,
Darrell Stec da*****@neo.rr.com

Webpage Sorcery
http://webpagesorcery.com
We Put the Magic in Your Webpages
Jul 21 '05 #16
On Tue, 19 Apr 2005, Darrell Stec wrote:
If there's a right and a wrong way to compose pages, the right way
works for both sorts of user, the wrong way only works for the
unthinking masses, then why waste time trying to find excuses for
doing it wrong?


And who decided it was the "right way?"


Which part of "the right way works for both sorts of user, the wrong
way only works for the unthinking masses" was causing you
comprehension difficulties?
Jul 21 '05 #17
After serious contemplation, on or about Wednesday 20 April 2005 8:20 pm
fl*****@ph.gla.ac.uk wrote:
On Tue, 19 Apr 2005, Darrell Stec wrote:
> If there's a right and a wrong way to compose pages, the right way
> works for both sorts of user, the wrong way only works for the
> unthinking masses, then why waste time trying to find excuses for
> doing it wrong?


And who decided it was the "right way?"


Which part of "the right way works for both sorts of user, the wrong
way only works for the unthinking masses" was causing you
comprehension difficulties?


The part where you assumed that programming for a very tiny minority of
snobbish programmers was the right way.

It is beyond my comprehension you could maintain that in light of the fact
that you have no evidence that people alter their browsers beyond this
limited group who advocates such in this newsgroup.

It seems that giving font sizes is an intended objective of those who
formulated CSS, else they would have simply decided to code CSS guidelines
to include nothing but relative sizes. None of the most popular websites
seemed too concerned with YOUR ironclad rule.

--
Later,
Darrell Stec da*****@neo.rr.com

Webpage Sorcery
http://webpagesorcery.com
We Put the Magic in Your Webpages
Jul 21 '05 #18
On Wed, 20 Apr 2005, Darrell Stec wrote:
The part where you assumed that programming for a very tiny minority
of snobbish programmers was the right way.


So you're ignoring my previous answer to that point. Fine.

Bye now.

Jul 21 '05 #19
Darrell Stec wrote:

[snip]
It seems that giving font sizes is an intended objective of those who
formulated CSS, else they would have simply decided to code CSS guidelines
to include nothing but relative sizes.
You are aware that CSS has applications outside both (X)HTML and the
screen media type, aren't you? In some cases, it would be perfectly
acceptable to specify any sort of dimension in absolute units, but it
isn't for the Web.
None of the most popular websites seemed too concerned with YOUR ironclad rule.


Because they can afford to be. "Popular" sites tend to offer services
that cannot be found elsewhere. However, that's no reason to follow
suit. Just because the past or present authors of their sites are (or
were) clueless doesn't mean you or anyone else should seek to emulate them.

Good grief! Why is professionalism so hard to come by in the industry?

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 21 '05 #20
Michael Winter wrote:
Good grief! Why is professionalism so hard to come by in the industry?


Because it's overwhelmed with clueless amateurs and users of M$
garbageware page creation software. :-(
--
"Love your neighbor as yourself." Matthew 22:39 NIV

Team OS/2 ** Reg. Linux User #211409

Felix Miata *** http://members.ij.net/mrmazda/auth/

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Jul 21 '05 #21
Michael Winter wrote:
Darrell Stec wrote:

[snip]
It seems that giving font sizes is an intended objective of those who
formulated CSS, else they would have simply decided to code CSS
guidelines
to include nothing but relative sizes.

You are aware that CSS has applications outside both (X)HTML and the
screen media type, aren't you? In some cases, it would be perfectly
acceptable to specify any sort of dimension in absolute units, but it
isn't for the Web.
None of the most popular websites seemed too concerned with YOUR
ironclad rule.

Because they can afford to be. "Popular" sites tend to offer services
that cannot be found elsewhere. However, that's no reason to follow
suit. Just because the past or present authors of their sites are (or
were) clueless doesn't mean you or anyone else should seek to emulate them.

Good grief! Why is professionalism so hard to come by in the industry?

Mike

Re-read this thread and you'll get an idea. :-(

--RC
Jul 21 '05 #22

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

21 posts views Thread by Amy | last post: by
47 posts views Thread by Neal | last post: by
2 posts views Thread by Richard Lissimore | last post: by
6 posts views Thread by glakk | last post: by
3 posts views Thread by Paulo | last post: by
4 posts views Thread by parez | last post: by
reply views Thread by leo001 | last post: by

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.