Click to See Complete Forum and Search --> : 3 questions


ck_net_2004
08-27-2004, 04:05 AM
1. How do you change the explorer logo in the url bar to a custom logo of your own?
2. How do you change the cursor to a custum one for the page or on a mouse over?
3. I have a div that can be dragged around the screen by its top bar, how can i make the rest of it when clicked make the div be on top of any other divs.

AdamGundry
08-27-2004, 04:40 AM
1. I believe you need to edit the registry key "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Toolbar". This page (http://www.kellys-korner-xp.com/throbber.htm) explains how to do it.

2. Use the CSS cursor (http://www.w3.org/TR/REC-CSS2/ui.html#cursor-props) property.

3. Use JavaScript to set the z-index (http://www.w3.org/TR/REC-CSS2/visuren.html#z-index) property of the div higher than the other divs.

Adam

ck_net_2004
08-27-2004, 04:46 AM
Thanks for the reply, if you could give me some code examples it would realy help me, also sorry for the vague subject title i just read the guidelines forum.

AdamGundry
08-27-2004, 05:17 AM
1. This one doesn't really need an example, just read the article.

2. This CSS will set a custom cursor for all paragraph tags. It will attempt to load the file "mycursor.cur" and use that, or if that doesn't work it will show a standard question mark "help" cursor.
<style type="text/css">
p {
cursor: url("mycursor.cur"), help;
}
</style>

3. This one is a little difficult because I don't have the existing code, but the example below should display two divs that bring the other one to the front when clicked on.
<style type="text/css">
.overlapped { position: absolute; left: 0em; top: 0em; }
#one { background-color: red; }
#two { background-color: blue; }
</style>

<div class="overlapped" id="one"
onclick="document.getElementById('two').style.zIndex = document.getElementById('one').style.zIndex + 1">Section One</div>
<div class="overlapped" id="two"
onclick="document.getElementById('one').style.zIndex = document.getElementById('two').style.zIndex + 1">Section Two</div>

Adam

ck_net_2004
08-27-2004, 05:37 AM
Thanks again Adam, the page you refered to for the url bar
icon seemed to just be about changing it permently on your computer,
not on just one html page.
does the cursor have to be a .cur file or can it be a .bmp?
thats great that example for the zindex, thanks.

schizo
08-27-2004, 08:39 AM
Below is some information on how to change the url icon for an individual html file. I'd recommend method 2.

http://www.codelifter.com/main/javascript/favicon1.html

AdamGundry
08-27-2004, 08:54 AM
Sorry, I think I misread the first part of your question. Schizo's example should be fine.

I think the cursor file has to be a .cur, but it may well be browser/platform dependent. As shown in the example, you can provide a comma-seperated list of cursors, and the browser will use the first one it understands.

Adam