css box question

Loud_TIGER

2[H]4U
Joined
Jun 24, 2000
Messages
2,885
say i have a 2 col setup, with two boxes. i want to have the content in one box while having links in the other box. is it possible to click on the links on one box and have it display in the other, similar in the way frames would have it?
in other words, i can have a navigation panel on the left, and have the content display on the right, with a frame. can i do the same with boxes and css?

thanks
 
Well, fact is I have no idea. I would guess it requires a scripting language, but then again, I haven't tried it before, so not sure it's not possible. Closest thing I have seen of what you're trying to do is the menu in the following link: http://www.meyerweb.com/eric/css/edge/popups/demo.html . Maybe it's possible by using a:active somehow instead of a:hover, but I don't see it as a possibility. But at least you know you can do it without clicking on the link, but hovering over it instead. Maybe that's good enough.~

Anyway, GL.
 
I know that it is possible if you use images and Javascript. ie the onclick. If you want check out the source on the pics section of my site. I use a onmouseover event to change the image in a different div tag.
 
Do you care if the page reloads?

If not, just create a bunch of seperate pages and use Server Side Includes to put all the html and code above the content, and then another to put all the content in below.

HTML:
<!-- #include virtual="menutop.html"-->
CONTENT HERE
<!-- #include virtual="menubottom.html"-->

And each page would have different content, but the rest would look the same for every page.



If that isn't what you want, you'd have to do something with javascript. You can program a function for the onClick event. For example, if using an image as the button....

HTML:
<img src="whatever.jpg" onClick="javascript:changeContent('Place this text in the other box');">

Code:
function changeContent(content) {
   document.getElementByID('divcontentbox').innerHTML = content;
}

I'm not sure if all that's working code, but should give ya an idea.
 
Back
Top