Tableless Layout -- Gaps Appear on PC Only

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • fleemo17@comcast.net

    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

  • Peter Hoyle

    #2
    Re: Tableless Layout -- Gaps Appear on PC Only

    <fleemo17@comca st.net> wrote
    [color=blue]
    > 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.)[/color]

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

    --
    peter



    Comment

    • Beauregard T. Shagnasty

      #3
      Re: Tableless Layout -- Gaps Appear on PC Only

      fleemo17@comcas t.net wrote:[color=blue]
      > 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.)[/color]

      ...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.

      Comment

      • mscir

        #4
        Re: Tableless Layout -- Gaps Appear on PC Only

        Peter Hoyle wrote:
        [color=blue]
        > <fleemo17@comca st.net> wrote
        >[color=green]
        >>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.)[/color]
        >
        > For IE 6 you could try removing all the white space between the <image> tag
        > and the following div.[/color]

        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

        Comment

        • fleemo17@comcast.net

          #5
          Re: Tableless Layout -- Gaps Appear on PC Only

          >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!
          [color=blue]
          >You should always set a background color every time you set a color. <[/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?
          [color=blue]
          >There is also always a horizontal scrollbar. See if you can fix that.[/color]
          <

          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

          Comment

          • Beauregard T. Shagnasty

            #6
            Re: Tableless Layout -- Gaps Appear on PC Only

            fleemo17@comcas t.net wrote:

            [Beauregard wrote:][color=blue][color=green]
            >> You should always set a background color every time you set a
            >> color.[/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?[/color]

            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;
            [color=blue][color=green]
            >> There is also always a horizontal scrollbar. See if you can fix
            >> that.[/color]
            >
            > 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?[/color]

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

            --
            -bts
            -This space intentionally left blank.

            Comment

            • mscir

              #7
              Re: Tableless Layout -- Gaps Appear on PC Only


              fleemo17@comcas t.net wrote:

              <snip>
              [color=blue][color=green]
              >>There is also always a horizontal scrollbar. See if you can fix that.[/color]
              >
              > 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?[/color]

              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

              Comment

              • fleemo17@comcast.net

                #8
                Re: Tableless Layout -- Gaps Appear on PC Only

                Man you guys are good! Mike, that solved the scroll bar problem. And
                thanks for the tips, Beau.

                -Fleemo

                Comment

                • Darrell Stec

                  #9
                  Re: Tableless Layout -- Gaps Appear on PC Only

                  After serious contemplation, on or about Monday 18 April 2005 8:31 pm
                  a.nony.mous@exa mple.invalid wrote:
                  [color=blue]
                  > fleemo17@comcas t.net wrote:
                  >
                  > [Beauregard wrote:][color=green][color=darkred]
                  >>> You should always set a background color every time you set a
                  >>> color.[/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?[/color]
                  >
                  > 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.
                  >[/color]

                  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.


                  [color=blue]
                  > When/if you set color: on other elements, you could/should also set
                  > background: transparent;
                  >[color=green][color=darkred]
                  >>> There is also always a horizontal scrollbar. See if you can fix
                  >>> that.[/color]
                  >>
                  >> 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?[/color]
                  >
                  > Could be. Remove it and see if the problem goes away.
                  >[/color]

                  --
                  Later,
                  Darrell Stec darstec@neo.rr. com

                  Webpage Sorcery

                  We Put the Magic in Your Webpages

                  Comment

                  • Alan J. Flavell

                    #10
                    Re: Tableless Layout -- Gaps Appear on PC Only

                    On Mon, 18 Apr 2005, Darrell Stec wrote:
                    [color=blue]
                    > a.nony.mous@exa mple.invalid wrote:
                    >[color=green]
                    > > 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.[/color]
                    >
                    > Are there any hard statistics on how many users change style in
                    > their web browsers?[/color]

                    No. But when there's a right and a wrong way, why waste time trying
                    to find excuses for doing it wrong?
                    [color=blue]
                    > I hear it oft repeated on this newsgroups, but it doesn't seem
                    > to be much of an issue on most CSS forums.[/color]

                    That's because we deal with discerning users, instead of
                    the unthinking masses. SCNR.
                    [color=blue]
                    > The reason I am asking is that I have never known anyone personally
                    > that even changed the font style or size in a browser,[/color]

                    Then you've led a very sheltered life.
                    [color=blue]
                    > attributes but I read here that most poster seem to think almost
                    > everbody does it.[/color]

                    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.
                    [color=blue]
                    > I think the norm would be that people wish to view a web page the
                    > way the author laid it out.[/color]

                    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.

                    Comment

                    • Darrell Stec

                      #11
                      Re: Tableless Layout -- Gaps Appear on PC Only

                      After serious contemplation, on or about Tuesday 19 April 2005 3:29 am
                      flavell@ph.gla. ac.uk wrote:
                      [color=blue]
                      > On Mon, 18 Apr 2005, Darrell Stec wrote:
                      >[color=green]
                      >> a.nony.mous@exa mple.invalid wrote:
                      >>[color=darkred]
                      >> > 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.[/color]
                      >>
                      >> Are there any hard statistics on how many users change style in
                      >> their web browsers?[/color]
                      >
                      > No.[/color]


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

                      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?

                      [color=blue][color=green]
                      >> The reason I am asking is that I have never known anyone personally
                      >> that even changed the font style or size in a browser,[/color]
                      >
                      > Then you've led a very sheltered life.[/color]


                      That I doubt tremendously.
                      [color=blue]
                      >[color=green]
                      >> attributes but I read here that most poster seem to think almost
                      >> everbody does it.[/color]
                      >
                      > 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?
                      >[/color]

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

                      Which includes by your own definition almost nobody. Why program for the
                      selected few?
                      [color=blue][color=green]
                      >> I think the norm would be that people wish to view a web page the
                      >> way the author laid it out.[/color]
                      >
                      > 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.[/color]

                      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 darstec@neo.rr. com

                      Webpage Sorcery

                      We Put the Magic in Your Webpages

                      Comment

                      • Alan J. Flavell

                        #12
                        Re: Tableless Layout -- Gaps Appear on PC Only

                        On Tue, 19 Apr 2005, Darrell Stec wrote:
                        [color=blue]
                        > 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?[/color]

                        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?
                        [color=blue]
                        > Why program for the selected few?[/color]

                        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?
                        [color=blue][color=green]
                        > > 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.[/color]
                        >
                        > This idea seems to lie exclusively with posters to this board.[/color]

                        Giggle. Condemned out of your own keyboard.

                        Comment

                        • Beauregard T. Shagnasty

                          #13
                          Re: Tableless Layout -- Gaps Appear on PC Only

                          Darrell Stec wrote:[color=blue]
                          > 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.[/color]

                          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.

                          Comment

                          • Eric Kenneth Bustad

                            #14
                            Re: Tableless Layout -- Gaps Appear on PC Only

                            In article <3cjbomF6k8a00U 1@individual.ne t>,
                            Darrell Stec <darrell_stec@w ebpagesorcery.c om> wrote:
                            }After serious contemplation, on or about Monday 18 April 2005 8:31 pm a.nony.mous@exa mple.invalid wrote:
                            }> fleemo17@comcas t.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

                            Comment

                            • kchayka

                              #15
                              Re: Tableless Layout -- Gaps Appear on PC Only

                              Darrell Stec wrote:[color=blue]
                              > After serious contemplation, on or about Tuesday 19 April 2005 3:29 am
                              > flavell@ph.gla. ac.uk wrote:[color=green]
                              >>
                              >> 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?[/color]
                              >
                              > And who decided it was the "right way?"[/color]

                              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.

                              Comment

                              Working...