I'm working on a project and it uses JavaScript and CSS. I don't know a thing about JavaScript and I know a little CSS. Here's the problem:

I have a page that has a list of links on the left side and when you mouse over them, the contents appear on the right side. I put the contents in a fixed position using CSS so that when you scroll down the list of links (there is a scroll bar on the right side of the page), the content stays in place.

I did this because the content would remain at the top of the page while you scrolled down the list of links and eventually was not visible. Using the CSS position:fixed, the content stays in that fixed position relative to the browser. But when you scroll down the web browser, the content floats over or eventually out of the box still in it's fixed position from the browser.

What could I use in JavaScript to prevent this from happening?

Recommended Answers

All 4 Replies

in css, fix the content box, instead of the content, the content will inherit the position of the parent box, and stay put, inside the box

The content is put into that content box by calling some server-side script. I can't get rid of the content div/box.

again, style the content box in css, as position:fixed; do not, aa, where is the ignore button I'm to old for this

again, style the content box in css, as position:fixed; do not, aa, where is the ignore button I'm to old for this

No need to be rude as I'm still in the learning process. I thought this forum was about helping others from all walks of life. I didn't realize you had to be an expert to get help. In my original post I mention that I use the CSS fixed position. In any case, I need to use javaScript, because my trainer insist so that I can have exposure to it. You know . . . to learn.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.