Jump to content

How to make buttons "fixed" against scrolling


keytoner

Recommended Posts

Hi everyone, I haven't here for awhile and I'm not sure I'm in the right forum. might need to be in css

I have two buttons that scroll along with the page, I want them to remain "fixed", as it will be a

very long page and I need the buttons to always be visible no matter how far down the viewer scrolls.

If anyone can guide me to where I can learn how to do this, I would be immensely grateful.

Thank you

John

oops! sorry, I forgot to put in some of the coding:

<script>

jQuery(function(){ // on DOM load
    menu1 = new sidetogglemenu({  // initialize first menu example
        id: 'togglemenu1',
        marginoffset: 10,
        downarrowsrc: 'toggledown.png'
    })

    menu2 = new sidetogglemenu({  // initialize second menu example
        id: 'togglemenu2',
        position: 'right',
        source: 'togglemenu.txt',
        revealamt: -5
    })
})

</script>
</head>

<body>
<button onClick="menu1.toggle();" class="sideviewtoggle">Toggle Menu 1</button>
<button onClick="menu2.toggle()" class="sideviewtoggle">Toggle Menu 2</button>

Edited by keytoner
Link to comment
Share on other sites

Thanks a million Ingolme!

Simple for you, but for some reason it passed over my head.

It works perfectly, almost.  The buttons moved from the top left to bottom right with a border around them.

I'll have to scrutinize the external css sheet and see if I can figure out the conflict;

But the buttons are fixed!

Thank you   (it's not the first time you've help me see the "forest thru the trees)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...