• 0

Anchors and overflow hidden problem in opera


Question

Hey guys.

I am working on the following website:

www.dutchmansbay.com

The content area of that site is a fixed height div with overflow:hidden. All of the pages for the site that are linked in the nav are actually on one page. The nav links are just anchors that when you click, the content jumps down to reveal the relevant content. Viewing the source for the site should make it all pretty clear what is going on.

The problem is, this does not work in Opera. Clicking the links does nothing. What is wrong here? Any help is much appreciated.

Thanks,

Jordan

8 answers to this question

Recommended Posts

  • 0

well there's nothing wrong with your html. it just looks like opera does not support this. i tried it on one of my own pages and it didn't work either. i guess you'll have to compromise and set the overflow to auto which means you'll have a scrollbar down the side. :(

  • 0

is that way actually documented?

to me it seems as a 50:50 choice ot make. The coder has said to hide any overflow but then wants to scroll to it so you have to decide which overrules what. If you set overflow to hidden, then you dont want any scrolling in the div either so why should the browser scroll to an anchor?

  • 0
  Mike said:
is that way actually documented?

i have no idea. :p

but when something works in other browsers you automatically think that's the way it should be without actually thinking if it's correct or not. it may well be that opera is behaving in the correct manner. :)

  jordanthegreat said:
Ugh. iFrames do not validate to XHTML 1.0 Strict. Any other alternatives to get a similar effect?

can't think how else to do it. you certainly can't rely on javascript for navigation so it looks like you'll have to have a separate page for each link. or use overflow auto as i suggested above. i don't think a side scrollbar is the end of the world? :)

  • 0

Dont.

I have a fix. Worked for me.

Use ID instead of name.

So, <a id="rates"> or <a id="#rates">.

Atm, Im spacing becuase its 2:48 am and im tired lol.

But, since in CSS, # is for ID, i did that on my website, and it jumps there.

Like on some sites, you have the "top" in the footer and it goes to the top, and at the top of the body, it has "<a id="top">.

That works perfectly.

Same thing here. Let me know if it works. Try <a id="rates"></a> first.

  • 0
  Sikh said:
Dont.

I have a fix. Worked for me.

Use ID instead of name.

So, <a id="rates"> or <a id="#rates">.

Atm, Im spacing becuase its 2:48 am and im tired lol.

But, since in CSS, # is for ID, i did that on my website, and it jumps there.

Like on some sites, you have the "top" in the footer and it goes to the top, and at the top of the body, it has "<a id="top">.

That works perfectly.

Same thing here. Let me know if it works. Try <a id="rates"></a> first.

Hey thanks for the input but no luck with that either. What is your site so I can see how you did it.

  • 0

Ok so I just went with individual pages in the end.

Now that that is out of the way, I have one more quick question. In IE6.0 the #container box has scrollbars. Im pretty sure this is because I have overflow:auto set on that div. I set overflow:auto to get the div to stretch to contain all of the content. I think that changing it to overflow:hidden should fix the IE6 problem but havent tested it yet. What I want to know is if setting overflow:auto (or overflow:hidden) is the best way to get the div to stretch or if there is another method?

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Nvidia 576.80 WHQL graphics driver fixes 5090 FE on idle, adds new games, and more by Taras Buria Nvidia has released a new graphics driver with support for new games and a long list of various fixes. If you have a compatible graphics card, you can download driver 576.80 WHQL. It adds optimizations and day-0 support for FBC: Firebreak, DLSS 4 and multi-frame generation for REMATCH, and path tracing support for DOOM: The Dark Ages. Fixed gaming bugs in driver 576.80 include the following: Dune: Awakening: stability issues EA Sports FC 25: stability issues Dragons Dogma 2: displays shadow flicker Clair Obscur: Expedition 33: stability issues Enshrouded: crashes after launching game Monster Hunter World: stability issues when playing in DX12 mode Gray Zone Warfare: stability issues Marvel Rivals: stability issues Ghost of Tsushima Directors Cut: Flickering/corruption around light sources GTA V Enhanced: stability issues Honor of Kings: World: stability issues Forza Horizon 5: stability issues Indiana Jones and The Great Circle: Image corruption And here is the list of general bugs that have been fixed: GeForce RTX 5090 FE acoustic improvements for idle and low loads Changing a setting in the NVIDIA Control Panel -> Manage 3D Settings may trigger shader disk cache rebuild Twinmotion: Bugcheck when attempting to launch Adobe Substance 3D Painter: showing viewport corruption after baking BlackmagicDesign: UI overlay in Fusion page is not displayed correctly Video playback in a web browser may show brief red/green flash corruption Videos captured with NVIDIA App may appear washed out after editing with the Windows Photos app Certain DisplayPort 1.4 monitors may display random black screen flicker when connected to DisplayPort 2.1 graphics card In addition to the new driver, Nvidia released a new version of the Nvidia app, which now supports DLSS 4 override options under Driver Settings > Graphics for supported titles. With today's release, DLSS override is available for 46 new games, such as DCS World, F1 25, Frostpunk 2, Avowed, and more. The full list of new games is available here. Also, the Nvidia app now has optimal settings for Dune: Awakening, F1 25, FBC: Firebreak, and REMATCH. You can download the driver Nvidia 576.80 WHQL from the official website or the Nvidia app. Full release notes are available here (PDF).
    • And you can guarantee they're going to sell a phone that is full of non-U.S. made parts assembled by non-U.S. labor. Agent Orange wants iPhones built in the U.S. despite the cost but won't care about his own product if it can be made cheaper in Asia.
    • Sorry, no - Data protection is solely the responsibility of the user. If you value the data, you have multiple copies. Microsoft/Dropbox/Apple/Box etc will all have similar ToS - it's still your data and you're still responsible for your DR planning. Sure there may be an issue with access or the provider going bust or a catastrophic failure of infra the datacentre end, and that's a problem (potentially very large and SLA invoking problem) but if that scenario means you loose all your data that's on you at the end of the day. I'm a huge fan of OneDrive with KFM and FOD, it's brilliant and I use it all the time both personally and professionally, but in both cases OneDrive is not the only place the data is stored and nor should it (or any cloud service) ever be.
  • Recent Achievements

    • Experienced
      dismuter went up a rank
      Experienced
    • One Month Later
      mevinyavin earned a badge
      One Month Later
    • Week One Done
      rozermack875 earned a badge
      Week One Done
    • Week One Done
      oneworldtechnologies earned a badge
      Week One Done
    • Veteran
      matthiew went up a rank
      Veteran
  • Popular Contributors

    1. 1
      +primortal
      703
    2. 2
      ATLien_0
      271
    3. 3
      Michael Scrip
      213
    4. 4
      +FloatingFatMan
      186
    5. 5
      Steven P.
      143
  • Tell a friend

    Love Neowin? Tell a friend!