Log in

View Full Version : How can I make an object(picture) float throughout a website?



gracexl
04-18-2010, 10:22 PM
We want to have a portion of the code(which displays as a picture) float throughout everypage of the website. How can we accomplish that? We also want to make sure it works on smart phones as well.

Your suggestion is very much appreciated.

djr33
04-19-2010, 02:29 AM
Describe "float throughout every page of the website".

Do you need this to remain in the same place in every page?
Do you want it to move around within a page?
Do you want to track it's position between page loads?
And what exactly is 'float'?

gracexl
04-19-2010, 02:37 AM
Sorry for being unclear. I'd need this to remain in the same place in every page where people can scroll up and down the page, but the picture is visible to them at all time so they can click on it to initiate an online chat with us at anytime. Hope that makes a bit clearer. This solution needs to work on desktops, laptops and smartphones.

djr33
04-19-2010, 03:37 AM
Making this completely compatible with all smartphones might be hard since some have very limited browsers. But for advanced phones like the iphone, it will work fine.

Here's an option:
http://www.dynamicdrive.com/dynamicindex1/staticmenu.htm

Replace the contents of the <div> with anything you want-- a chatroom, a menu, etc.

In the example, there is a table, but that can be replaced with any other html.

anatolygilderman
04-19-2010, 03:07 PM
Thanks for this one. I have also been looking for the codes of floating menu. This is really nice

It is my first time here and I hopefully I will learn a lot from you guys!

gracexl
04-20-2010, 11:59 PM
Thanks for the code. I think it works to certain extend, but needs some modifications. I replaced your code to the following code.

<div class="box">
<div id="craftysyntax">
<script type="text/javascript" src="/livehelp/livehelp_js.php?eo=1&relative=Y&amp;department=2&amp;serversession=1&amp;pingtimes=15"></script>
<br><font style="font-family: verdana, helvetica, sans-serif; font-size: 8px; color: #000000;">Powered By:</font>
<a href="http://www.craftysyntax.com" alt="Crafty Syntax Live Help" target="_blank" style="font-family: verdana, helvetica, sans-serif; font-size: 10px; color: #11498e; text-decoration: none; font-weight: bold;">Crafty Syntax</a>
</div>
</div>

I can sort of tell there is a box moving on the left side, but can't see it. The effect can be viewed at http://72.52.89.208/greatout.htm

Can you help?

Many thanks,

Grace

djr33
04-21-2010, 03:19 AM
As far as I can tell, that works well (using firefox). What is the problem?
I don't believe the script needs any modifications-- just replacing the inside of that div is what you need. The only "script" aspect is that it makes the div float. The content in the div is what can be changed. However, it looks like this exactly what you did-- does it not do what you want?