background image making scroll bars appear

Discussion in 'HTML' started by Bob, Jun 28, 2008.

  1. Bob

    Bob Guest

    Here is a page:

    http://www.geocities.com/pathdestroyer/possible.html

    If you view this page at 1024px, there are scroll bars. I do not these
    scroll bars to appear. What can I do to stop them appearing? Please
    disregard the Geocities banner.

    If you view the page at 1126px, the scroll bars go.

    The 1px wide background image needs to be repeated across the full width of
    the page.

    Cheers,

    Bob.
    Bob, Jun 28, 2008
    #1
    1. Advertising

  2. On Jun 28, 8:19 am, "Bob" <> wrote:
    > http://www.geocities.com/pathdestroyer/possible.html
    > If you view this page at 1024px, there are scroll bars. I do not these
    > scroll bars to appear. What can I do to stop them appearing? Please
    > disregard the Geocities banner.


    Make the image smaller.
    Travis Newbury, Jun 28, 2008
    #2
    1. Advertising

  3. Bob

    Els Guest

    Travis Newbury wrote:

    > On Jun 28, 8:19 am, "Bob" <> wrote:
    >> http://www.geocities.com/pathdestroyer/possible.html
    >> If you view this page at 1024px, there are scroll bars. I do not these
    >> scroll bars to appear. What can I do to stop them appearing? Please
    >> disregard the Geocities banner.

    >
    > Make the image smaller.


    It's a background image, and it has no influence on the width of the
    elements. The OP's problem is that he has the paragraph set to 1024px
    width, which is too wide if the window is 1024px wide, since there are
    2 more frames in the picture. (plus the borders of the window itself).
    Also, he's set the parent div of that paragraph to be 1126px wide,
    which fits even less inside a 1024px window.

    To the OP: if you don't want the scrollbars, don't set widths. Just
    don't set them at all, divs and paragraphs will automatically fill up
    the available width by themselves.

    --
    Els http://locusmeus.com/
    Els, Jun 28, 2008
    #3
  4. On Jun 28, 9:15 am, Els <> wrote:
    > > Make the image smaller.

    > It's a background image, and it has no influence on the width of the
    > elements.


    My bad, I didn't look that close.
    Travis Newbury, Jun 28, 2008
    #4
  5. Bob

    Bob Guest

    Bob, Jun 28, 2008
    #5
  6. Bob

    Els Guest

    Els, Jun 28, 2008
    #6
  7. Bob

    Bob Guest

    So in other words it is not possible without making the page 1126px wide?
    Unless you set the body tag to include the 1126px wide background image?

    Cheers,

    Bob.
    Bob, Jun 28, 2008
    #7
  8. Bob

    Els Guest

    Bob wrote:

    > So in other words it is not possible without making the page 1126px wide?


    I don't think that's what I said.
    What I said, was that you should *not* set any width.
    Background images will show regardless of the width of the element.
    Just, of course a smaller part of it if the element is smaller than
    the image. Why don't you just try it out? Remove all widths from your
    CSS file, and see your problem disappear.

    > Unless you set the body tag to include the 1126px wide background image?


    Background images don't have to be on the body element. They can be
    set on a div just fine.

    --
    Els http://locusmeus.com/
    Els, Jun 28, 2008
    #8
  9. Bob

    Bob Guest

    Bob, Jun 28, 2008
    #9
  10. Bob

    Els Guest

    Bob wrote:

    >> Remove all widths from your
    >> CSS file, and see your problem disappear.

    >
    > I did, and the gradient image:
    > http://www.geocities.com/pathdestroyer/datarental_navimage_1126x30.jpg
    > didn't appear.


    Right. I did not know that your "gradient" image would have a large
    white nothing in the middle. I bet the image does appear, you just
    don't recognize its white part as being your gradient image.

    Seriously now, that particular image, 1126px wide, of which the middle
    1024px (I'm just guessing, didn't measure it) are white nothingness,
    how in the world would you want that to be visible inside a window
    that is 1024px wide?


    --
    Els http://locusmeus.com/
    Els, Jun 28, 2008
    #10
  11. Bob

    Bob Guest


    > how in the world would you want that to be visible inside a window
    > that is 1024px wide?


    The white nothing in the middle is the transparent area. I don't want it to
    be visible in a window that is 1024px wide. But in a window that is 1126px
    wide I would like it to be visible.

    http://www.geocities.com/pathdestroyer/possible.html - it needs to look like
    it does on this page. Notice the gradients at either end when viewed at
    1126px and above. However when viewed at 1024px, there should be no scroll
    bars.

    Cheers,

    Bob.
    Bob, Jun 28, 2008
    #11
  12. Bob

    Els Guest

    Bob wrote:

    >> how in the world would you want that to be visible inside a window
    >> that is 1024px wide?

    >
    > The white nothing in the middle is the transparent area.


    It's not transparent.

    > I don't want it to
    > be visible in a window that is 1024px wide. But in a window that is 1126px
    > wide I would like it to be visible.
    >
    > http://www.geocities.com/pathdestroyer/possible.html - it needs to look like
    > it does on this page. Notice the gradients at either end when viewed at
    > 1126px and above. However when viewed at 1024px, there should be no scroll
    > bars.


    My best guess at what you really want:
    - you want a page that can be any width without scrollbars.
    - you want the middle of the top of the page to show the 1px wide
    repeated image called datarental_navgrad_1x30.gif.
    - if the page is wider than 1024, you want this image to stop, and let
    this image show on the sides: datarental_navimage_1126x30.jpg.

    If you still want the 1px image to stop hiding the 1126px image at
    widths higher than 1024px, but without scrollbars at lower widths, you
    need to change the following in your stylesheet:
    - remove all widths
    - add max-width:1024px to the paragraph.
    Note: this will not work in IE6 and lower.

    --
    Els http://locusmeus.com/
    Els, Jun 28, 2008
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. S. Justin Gengo

    Re: DIVs and overflow scroll bars

    S. Justin Gengo, Jul 18, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    412
    S. Justin Gengo
    Jul 18, 2003
  2. rf
    Replies:
    0
    Views:
    430
  3. Paul F. Johnson
    Replies:
    4
    Views:
    343
  4. UJ
    Replies:
    1
    Views:
    566
    John Timney \(MVP\)
    Nov 1, 2006
  5. ed
    Replies:
    3
    Views:
    106
Loading...

Share This Page