Hi all..

I want to disable 'centre click' of mouse for my website..How could i do this??

Thank You :)

Recommended Answers

All 5 Replies

Why do you want to disable centre click? All it does is scroll or open links in a new tab.

I want to disable the centre click because the user could also scroll to right or the left of the webpage insteaad of just down and up..

I do not want the user to scroll to the right of my webpage beacause i got problem with the my image baground,and causing a space to the right of the page,which i do not want to.


Look at the image above,that is the unwanted space that i just mentioned.I've tried to modified the code like putting the width and so on,but it is still not working.This is the original code of the body where i put my baground :

body {
    background-image:url(../images/bg-home.jpg);
    margin: 0;
    padding: 0;
    overflow-x:hidden;
}


I dont know what else to do,so that i am deciding to just disable the center click..
Please help me.
Thank You..

Disabling centre click won't stop them from scrolling across.

It's very likely you have some content on your page which is stretching it wider than you want. Also, the url in the background image should have quotes:

background-image: url('../images/bg-home.jpg');

oh i see..now my problem is fixed.Theres the menu width i needed to modify.

But how could the other scrolling across without the center click.

But anyway, Thank You for your time :)

The scrollbar at the bottom of the page would have allowed them to scroll horizontally and if they had scroll lock enabled, they could just use the arrow key. Highlighting the problem area would also allow them to effectively "drag" the screen across.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.