How to prevent scrolling in frames

Discussion in 'Software' started by RexNoctis, Aug 23, 2005.

  1. RexNoctis

    RexNoctis Corporal

    Hi all,

    This may be a really obvious question, but I did search! Honest!

    I have a webpage with three frames and I want to prevent the title frame from scrolling. It has a large image in it so that it works correctly with browsers of different resolutions. I have used the scrolling-"no" option which hides the scrollbars themselves and have also put onSelectStart="return false;" in the title page to prevent the image being selected , but I can still scroll the image using the mousewheel.

    Is there any way of preventing the wheel from scrolling the frame?

    Thanks,
     
  2. soapbar89

    soapbar89 Private E-2

    It be scrollling because of a margin problem.
    Make this your body tag in the selected frames page:

    <BODY marginwidth="0" marginheight="0" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">

    I would also consider not using frames. They may save time and make it easy to update your site, but they also cause a lot more trouble in the long run such as the problem you are having now, search engines having a hard time indexing your site, bookmaking/favorite functions dont work well, and many other reasons. I used to use frames in almost every site I made, but then realised how much they make the situation worse.

    Hope this help and let me know how your scrolling situation goes.
     
  3. RexNoctis

    RexNoctis Corporal

    Sorted! Cheers! I fiddled with the image and between that and your suggestion, it does what it's told :)

    I've used frames since Uni when most people were using dial-up. Less to load each time. Never really grown out of the habit.

    I know frames can cause problems, I use a lot of ASP in the site, ASP doesn't recognise frames at all, because it's run on the server. Mixing it up with some Javascript to get all the frames to update when required. Makes the code extremely messy but provided it works, I'll work on cleaning it up later.

    Thanks for the help, hopefully see you around MG :)

    Edit: I use VB as my language of choice, because it's the one I know, that's why mixing it with Javascript gets messy - Thought I should point that out :)
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds