>> Have the button change it to visibility: visible
So this needs javascript...(in case that was your next question, John)
Main Topics
Browse All TopicsI have a webpage with a div named "#Block1", containing two divs named "#topLeft" and "#topRight."
Is it possible to put a button in #topLeft that brings up a div named "#descriptionLong" (height and width of 280px), and floats it centered over #Block1?
If so, how?
Thanks!
John
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
you can use either float or absolute positioning, if you are not worried about them visually overlapping, as in a background image with text over it. If you use the latter, you can simply declare all your DIVs one after the other, and then position them where you want to with CSS. Keep in mind, there is the problem of different browsers rendering absolute position different than each other, as well as the problem of items overlapping one another, but if that is your intent, and you can debug the X-browser issues, use absolute positioning, by all means -- one DIV or SPAN per element, and fiddle the absolute until it looks as you want it in all browsers.
This al looks very promising. I figured it would be a visibilty on/off thing like in VBA. My first question would be: how do I position a div to float free over other divs without messing them up.
Can't wait to start trying out your suggestions and any more you might have over the weekend.
Thanks!
John
"how do I position a div to float free over other divs without messing them up."
as I said, use absolute positioning in the DIV and it will position more or less to that place, depending on the browser you are using. Else put the DIV where you want it, if you want a full row to show, or use <SPAN> if you just want a short part of the row to show, and toggle its visibiliity on or off.
grendel777, thanks for the link. I couldn't make sense of it, but it prompted me to google some phrases which eventually led me to a site where I found code samples that with a little tinkering produced exactly the result I was looking for. Even though it's a very beginner-friendly site, I think you might find some useful or interesting things on it: http://bonrouge.com
Jason, thanks for pointing out the fact that I needed javascript (of which I now actually have a minimal understanding!)
And scratchyboy, thanks for pointing out the need for absolute positioning.
The big problem I'm having now is incorporating it into my existing code. Please take a look at "test2.html," and let me know what I'm doing wrong in "CowBoom_Toggle.html." They both have links to their respective .css an .js docs, if the problem is in one of those.
http://www.discretedata.co
http://www.discretedata.co
Thanks!
John
John,
I took a look at bonrouge's stuff and the problem I think you are having is that the sample you used was his basic sample that had minimal elements on the page. Because your page is complex, with multiple ID tags, there may be too many elements for the simple js to work.
You should continue reading his tutorials and get the to the more advanced one where he talks about the function toggleNextByIdAndTag()
If I'm following his logic correctly, he's designating which tags and IDs are toggled by passing it through the onLoad() event.
http://bonrouge.com/~toggl
Read all the way down the page to see how the script gets progressively more complex.
Excellent suggestion. I probably won't have time again til Monday to work on it. I actually tried using all the code before, but I probably copied and pasted something wrong. Hopefully, when i'm more careful and deliberate, and know a little more about how it works, all the code on that page will be enough to handle what's going on in my page.
Oh and thanks for getting me started with javascript.
John
You're welcome.
As you read through his examples, pay attention to how he puts actual tags and ID's in the javascript function to allow the popup to work and doesn't add visibility or display to the CSS. The javascript handles all of that.
By the way, you don't use visibility for this instance, you use display: block and display: none.
Business Accounts
Answer for Membership
by: grendel777Posted on 2008-02-01 at 14:07:09ID: 20801215
Hi John, the easiest way to do it is to simply create the <div> and place it where you want it to show up, then set it to
ss/pr_clas s_visibili ty.asp for details on the visibility property.
visibility: hidden
Have the button change it to
visibility: visible
See http://www.w3schools.com/c
HTH!