Floating

D

Don Schmidt

At http://www.vanusa.org/events/index.html I have a webpage created with
Publisher 2000 that is 48" in length.

Below the heading is a table containing the twenty-four months of 2008 &
2009 (gets updated at the end of the present year)

By clicking on any month in the table takes you to that month's listings.

Can the table (made vertical) be made to "float" at the right side so when
viewing halfway down the page the table is still in view at the right?
Is there some exotic java-script that can do this?

My hope is that I can facilitate moving from one month to another without
the necessity of clicking to the "Top of page" arrow, then selecting from
the table another month.
 
S

Spike

Well it seems to have worked for you

Spike



Don Schmidt said:
Spike,

Thanks for the suggestion. I'm in the middle of testing the "float" at
http://www.iinet.com/~defcon_one/

Presently I've linked to files but I see no problem linking to html code
links on the page.

I've yet to see if ReplaceInFiles will be able to handle all that needs to
be added to the html file.

More experimenting yet to do.

Many thanks for sharing your find.
 
S

Spike

Don

Played with script
Changed "frombottom" to "fromtop"
and
startY = 150; to startY = 10;
(see below)
This allows you to move the box on the page

Spike

//Enter "frombottom" or "fromtop"
var verticalpos="fromtop"

if (!document.layers)
document.write('</div>')

function JSFX_FloatTopDiv()
{
var startX = 3,
startY = 10;
 
D

Don Schmidt

Spike,

My preference for the float would be approximately 200 pixels right of
center; so the float would be located at the right edge of the webpage.

As the script is written it places the float to the extreme left. On my 22"
widescreen monitor it leaves a large gap between the centered webpage and
the float. Viewers with their monitors at 800 pixels wide would have the
float on top of the webpage. Being on top of the webpage is fine, but I'd
like it at the right edge. I'll do some more tinkering to see if I can get
the float on top of the webpage, at the right edge.

Thanks again on your input; 'really appreciate the effort.
 
S

Spike

Replace in files won't work
Will need a program that can replace multiple lines (found a few on line $$)
The script will not function if it is on a single line :(

Spike
 
D

Don Schmidt

Spike,

Looks like the float project is on hold until I find a way to move it to
right of center just enough to overlay the right edge of the webpage.

As far as a "ReplaceInFiles" method of doing any changes to the html file, I
was considering retaining a float text file and do a copy paste on the
script.

I may write the author of the float script to see if s/he had any
suggestions.
 
S

Spike

Don

This might help: I changed "absolute" to "relative" so that no mater what
size screen you are using the floating nav bar shows up in the same relative
place especially if you center the page. Also I modified the code so that
the link of the page you are on is a different color. I modify each link on
each page. More work but then nothing is free. I have had some feedback
from users that the different color link is useful to show where they are as
they go through the pages. Example is for page photos03.htm. I removed the
background color so the it appears transparent (just the text shows inside
the frame).

Spike

<script>
if (!document.layers)
document.write('<div id="divStayTopLeft" style="position:relative">')
</script>

<layer id="divStayTopLeft">

<!--EDIT BELOW CODE TO YOUR OWN MENU-->
<table border="1" width="170" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" >
<p align="center"><b><font size="4"> Carte du jour</font></b></td>
</tr>
<tr>
<td width="100%" >
<p align="center"><b><font size="4">
<a href="index.htm"><span style='color:black'>J & J</span></a><br>
<a href="wedding.htm"><span style='color:black'>Wedding</span></a><br>
<a href="reception.htm"><span
style='color:black'>Recption</span></a><br>
<a href="dinner.htm"><span style='color:black'>Dinner</span></a><br>
<a href="menu.htm"><span style='color:black'>Menu</span></a><br>
<a href="vows.htm"><span style='color:black'>Vows</span></a><br>
<a href="photos01.htm"><span style='color:black'>Photos
1</span></a><br>
<a href="photos02.htm"><span style='color:black'>Photos
2</span></a><br>
<a href="photos03"><span style='color:eek:range'>Photos 3</span></a></td>
 
S

Spike

Don't blame you for that
Editing is a pain when pages change

For my more stable pages I have come up with a scheme that cuts down on the
time:
I keep script files in notepad that are easily modified and copy/paste
moveable.

I also found out that if you build a nav bar as a table in publisher and
save it as a web page you can copy the code and paste it into the script.
Then paste the whole thing into the final product. The latest one I did
even worked in Firefox.

I liked the looks of the link that you posted.

Being semi retired I have time to try things.

Spike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top