Preserved Topic: Overflow troubles. |
|
---|---|
Author | Thread |
Paranoid (IV) Inmate From: Yes |
posted 02-22-2002 23:42
After finally settling on one out of 4 or 5 new designs, I've started really coding my site again. I'm focusing on big resolutions but it will still be usable at 800x600 (if all goes well). So far all is not going well. I have a header graphic that is wider than 800. All the important stuff on it is visible at 800x600, the rest just fades away so 800x600 users arn't missing out. It works great except the image causes a horizontal scroll bar. I tried messing with overflow but I realized that it applied to the contents of the element not the element itself. So I surronded the header with a div style="overflow: hidden" and then the entire header dissapeared. I tried messin' with clip and width etc. to bring it back but to no avail so I threw out the big parent div. I'm pretty sure there is a way to just elimnate the h scrollbar from the window but that just doesn't seem as sage as simply letting the image oveflow. After all what if someone in 800x600 isn't viewing at max res and a hscroll bar is needed? Any solutions? |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 02-23-2002 02:12
If you're sure that a horizontal scrollbar will never be needed, you should be able to say: |
Paranoid (IV) Inmate From: Yes |
posted 02-23-2002 02:15
The large surrounding div I made used that exact same code and it made the images disappear. I didn't try it on the body tag though. The layouts far from complete as of yet so I'm not sure if that srollbar will be needed or not yet. that's why I was hoping for something that just let the image overflow. |
Maniac (V) Mad Scientist From: New California |
posted 02-23-2002 02:15
Aaaahhhh the dreaded Horizontal Scrollbar Of Death!!! |
Paranoid (IV) Inmate From: Yes |
posted 02-23-2002 02:21
Slime: That code gets rid of the vertical scroll bar as well. damn it |
Maniac (V) Mad Scientist From: New California |
posted 02-23-2002 03:24
Ok there are other ways to do this. |
Maniac (V) Mad Scientist From: New California |
posted 02-23-2002 03:25 |
Paranoid (IV) Inmate From: Yes |
posted 02-23-2002 03:28
Whoops! I just changed the filename to home.html to test the javascript menu. I completely forgot to change the link here. My bad. |
Paranoid (IV) Inmate From: Yes |
posted 02-23-2002 03:35
Background image won't work cuz I've already got a background image. Notice the verticle cordiroy lookin' stuff? Its pretty suttle and I'd be upset if I had to trash it. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 02-23-2002 04:46
Alright, try this... |
Paranoid (IV) Inmate From: Yes |
posted 02-23-2002 04:56
Already tried it with no luck. Apparently even though the background for a page can be however long without scrolling, the background of a div or span affects a scroll. I guess its because the span or div is technically and object that is wider than the page even though its empty. *sigh* I'm determined to figure this thing out. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 02-23-2002 05:02
Are you sure? Because if you set the width:100%, then the div doesn't actually overflow off the edge of the page, and the background it contains is clipped. |
Paranoid (IV) Inmate From: Yes |
posted 02-23-2002 05:09
Lemme try again. The banner is actually 3 images, 2 transparent gifs so the bg will show through and the guy is a jpeg. |
Paranoid (IV) Inmate From: Yes |
posted 02-23-2002 05:34
WOOHOO kinda! We've won the battle but not the war. No more scroll bar but... IE apparently doesn't think 100% means the whole page so the image only goes so far. Any clues how to fix this NEW bug? |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 02-23-2002 06:13
Oh, I think it's because of the body's 25px padding. The 100% width makes it the maximum width that it can be within its parent element, and the maximum width it can be inside the body is the width of the window minus 25 pixels of padding on either side. So it falls 50 pixels short. |
Paranoid (IV) Inmate From: Yes |
posted 02-23-2002 07:21
You were right about the padding but when I set width to auto the div became only as wide as its contents which doesn't include the background. Argh, mozilla rendered it correctly! I took your advce and switched to spans and put all the pxs in (thanks for checkin' up on me) Oh and even when I got rid of the padding the div stopped when it encountered the right side orange bar instead of continuing underneath. |
Paranoid (IV) Inmate From: Yes |
posted 02-23-2002 10:09
If I set the width to 102% it works perfectly. Should I settle with this hack? |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 02-23-2002 21:56
Try giving the div |
Paranoid (IV) Inmate From: Yes |
posted 02-23-2002 22:56
thats the same as auto which is the default |
Paranoid (IV) Inmate From: Yes |
posted 02-23-2002 22:58
thats the same as auto which is the default |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 02-24-2002 01:26
SB: I'm jumping in a little late but if you only want to kill the scrollbar when its not needed then give the body the style overflow: auto - or have you tried that and it didn't work? I've done that before and it works nicely (unless you are going for a solution with its own scroller its never wise to switch of the scrollbars altogether as you can never predict the odd things the user may do!!). |
Paranoid (IV) Inmate From: Yes |
posted 02-24-2002 05:05
Slime, after a little reading I found that CSS only recognizes one left or right value. It defaults to left so if you have a value for both left and right, the right gets ignored |
Paranoid (IV) Inmate From: Yes |
posted 02-24-2002 09:54
Hey! I think I got it!!! Tell me if it works please |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 02-24-2002 21:49
Works. How'd you do it? |
Paranoid (IV) Inmate From: Yes |
posted 02-24-2002 22:24
code: #header { position: absolute; background: url(../images/title.gif) no-repeat 163px 0px; top: 0px; left: 0px; z-index: 3; height: 215px; width: 100%; margin:0px; padding:0px;}
|