Oops brain f@rt. i forgot what happens when you FIXP or AP something w/o coordinates.
This is my alternate solution: its based on AP rather than fixed so it should work in IE 5 and 6, it also scrolls from the inside of the UL… seemed to make more sense that way.
Both my and Paul’s idea have have the drawback that they assume you have a fixed height h3. Paul used padding at the top of the UL to push down, but if you H3 started to grown vertically it would cover up the list…) In either case the only way around this is to use css3… in which case a lot more than just IE6 would go out the window…
Yes the idea is not to use co-ordinates so the element becomes fixed at the position that it finds itself in the flow of the document.
This is my alternate solution: its based on AP rather than fixed so it should work in IE 5 and 6, it also scrolls from the inside of the UL… seemed to make more sense that way.
Yes, I mentioned that an easier alternative would have been to just place the header above the scrollbox instead
you code works but I need some changes.
Here is what I want
Neither mine nor Dresdens code produce the display shown in your example picture. In my example the scrollbar would be full width and there would be no gap at the bottom. The height of the top element can be controlled with the padding on the heading element used there.
In dresdens example there is no gap at the bottom but the scrollbar is only related to the ul so won’t stretch to the full height of the box. he already told you how to adjust the height of the header element as required.
height:40px;/*semi-optional*/
You have all the information to create the effect you want in two different ways now and the matter of spacing is just minor adjustments etc. If you are still stuck then post all the html and css that you are using because your code is different to the code that we supplied and we would need to see where you went wrong:).
Agree …but look will be different . I wanted the Header inside the box. Everything inside the container box.
I’ll be fine if you could make the solution IE compatible.
I already mentioned that for my code the fixed header would not work in IE6 but it would degrade gracefully and just scroll away which is acceptable for such an old browser.
It still does not give the display shown in your image though even in IE6.
I assume you added a doctype to dresdens solution?
If you are using mine, the scroller should be UNDER the yellow.
I dont understand what you are calling a “gap” at the top ( in yellow) that is the height of the header… you need SOME space to contain your header. The gap bellow… comes from either the padding or margin of the UL…
IE puts the scroll bars OUTSIDE the element (in this case the UL )… which may cause a problem; one that is easily fix with a * htlm hack to readjust the size for IE. However I dont see why this would even happen, as we gave no width to the UL.
The last code I posted works in chrome with no problems and is based on the method in Dresden’s code but tidied up to make the scrollbar appear full height of the whole box.
I can’t see a single difference between those two images and I can’t see a difference in the browsers when I test locally either as far as the element we have been talking about goes.
What exactly are the problems?
You need to be more verbose and please explain exactly what the problem is. I will not reply to any more one line replies such as “This breaks in Chrome ” as that does not tell me what you are seeing and indeed gives no indication of what you expected to happen.
The only thing I notice that is wrong and its wrong in all browsers is that you have made the h3 too wide and the background sits on top of the vertical scrollbar. You need to reduce the width of the h3 by about 16px.
The h3 needs a background colour otherwise you will see the text scroll underneath. You could use a white background if you didn’t want the h3 coloured.
when I plugged your code in my web page , it works fine in CHROME but does not work in IE6 properly.
The youtube video has nothing to do with the code that I have provided and the elements that we have previously been talking about. We’ve been talking and discussing the scrollbox on the left all the way through this thread so it’s not surprising that I misunderstood your problem
You said to me “Your code doesn’t work” but what you should have said was that you have added a new element with a youtube video embedded in the page and that this new element isn’t working in IE6 so please can you have a look at it.
Communication is important:)
As I said it has nothing to do with the scrollbox code and indeed in my version of IE6 the video is displaying as shown by the screenshot attached.
I assume the video you have embedded is for testing anyway so I suggest you go to youtube and find anther video to test with as that one was giving me problems in Firefox and crashing the browser.
As to why your video isn’t showing in your version of IEtester then I suggest that first you make sure you are running the latest version of IEtester and that cookie support is enabled. That video seems to link to a utube helper which could be the problem as it changes settings on the computer.
However embedding video is not my area and something I never do so you may need to ask questions in the flash forum for a better answer.