background image making scroll bars appear

B

Bob

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

Els

Travis said:
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.
 
B

Bob

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

Els

Bob said:
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.
 
E

Els

Bob said:

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?
 
B

Bob

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

Els

Bob said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top