Hi all
I was trying to figure out how to make a pop-up box appear when you hover over "contact" or either click on it, either way would work for me. I have no clue what to do or were to start.
Thanks for all your help
chevywes
ps hopefully my book " Build your own web site the right way using HTML and CSS - by Ian Lloyd
will be here next week.
I will assume that the pop
I will assume that the pop up box you want is a
function change() { if(document.getElementById("mydiv").style.display="none") document.getElementById("mydiv").style.display="block"; else document.getElementById("mydiv").style.display="none"; }
Then, when you create the link, you can call the javascript:
This is the link
This is more of a Javascript question, but I'm happy to help all the same 
pop up box
Thanks for steering me in the right direction.
I appreciate all the help.
chevywes
pop up box
how do I make the box and were do I put it (that's a loaded question isn't). do I put it in the same div as the code above or in a seperate div or not in a div at all.
I take it that I call the box up with the above code .... right
I apologize for my stupidity (maybe I should read comic books for a hobby) and thank you all for your patience and help.
If you're asking how to
If you're asking how to create the box, that depends. If you want to have the box follow the mouse, that will be more difficult and use more Javascript. However, if you want a box to "appear" in a certain position, and be the topmost element, you can use some simple CSS.
In the head of your document, you can define style for the ID for the box, like this:
<style type="text/css"> #mydiv { position: absolute; display: none; top: 20px; left: 20px; width: 80px; height: 80px; z-index: 100; } </style>
That will create a 80 x 80 pixel box 20px from the top of the screen and 20px from the left of the screen. Instead of using top and left, you can use margin-left: and margin-top: to space the box from its container rather than the absolute screen. Since I added the display: none; you can remove the style attribute from the HTML.
Hope this helps!
pop up box
Thanks for all your help.
I changed things around a bit, with the help of a friend.
I'll try and send an attachment.
Thanks again
wes
| Attachment | Size |
|---|---|
| hover.txt | 841 bytes |
After a quick glance, that
After a quick glance, that seems to work just fine. There's always more than one way to skin a cat 
Can this effect achieved using ONLY CSS
Hi guys. Solution to above problem is JavaScript. But can it be done in CSS ONLY?? :?
I tried like this.
In HTML
<dive id= "header"> Title of Site <div id="headerwindow">This is in popup window</div> </div>
And in CSS
#header{ font:... color: ...... } #headerwindow{ dispaly:none; } /*for required effect #header.hover{ ??????? }
What I should put at ????? to set "display" of #headerwindow to "block" ? Or is it possible actually?
I found solution
I found solution after many trials.
What I did is
In HTML
<dive id= "header"> Title of Site<span>This is in popup window</span></div> </div>
and In CSS
#header{ blah blah } #header span{ display: none; } #header:hover span{ display: block; }
And it worked. This is primary solution, will need some refinement. But at least it worked. Thanks.
