• 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

    • I'm wondering if they are doing this as a "backup" in case CISA ceases to exist. It almost did recently due to funding and it's future is shaky. CISA - https://www.cisa.gov/known-exploited-vulnerabilities-catalog Example "CVE-2023-39780" https://www.cve.org/CVERecord?id=CVE-2023-39780 ASUS RT-AX55 Routers OS Command Injection Vulnerability
    • Over regulation is bad. That's why the EU is behind the US. But, it's a good thing the EU stepped in, in this case.
    • Thanks to the EU, Windows 11 is now a little more tolerable.
    • Microsoft will finally stop shoving Edge down your throat, on one condition by David Uzondu Avid Windows users must be familiar with the dirty tactics Microsoft employs to push its Edge browser. It's a song as old as time; remember when Internet Explorer was primarily used as a tool to download Chrome or Firefox because it was the only thing available? Shortly after IE died, Edge inherited that legacy, becoming the browser you often had to use just to get the browser you actually wanted. Even Microsoft knows this: For years, we have endured the relentless pop-ups after updates, third parties being blocked from changing the default browser on Windows 11, banners appearing when you dare visit a competitor's download page, a fake "how to uninstall Edge" guide, and links within Windows apps that just had to open in Edge, regardless of your set preferences. Microsoft has announced it is dialing back some of this aggressive behavior, promising a reprieve from the constant Edge bombardment. But (and it's a pretty big but) this only applies if you're in the EEA. This shift isn't Microsoft suddenly having a profound change of heart and deciding to respect user choice out of the goodness of its heart. No, this is all thanks to the Digital Markets Act, a major EU rule that targets big online platforms, what they call "gatekeepers", because these companies have a huge impact on how the digital market works. So, what is actually changing for users in the EEA? For starters, Microsoft Edge will not prompt you to set it as the default browser unless you actually open it directly, like by clicking its icon on the taskbar. This specific change started rolling out with Edge version 137.0.3296.52. Other Microsoft apps will also stop bugging you to reinstall Edge if you dared to remove it, with updates for this rolling out in June to Windows 10 and 11. And speaking of default browsers, this is where a significant improvement lies. Previously, hitting "Set default" for your browser in Windows was half baked, only grabbing basic web links like http and https and HTML files. Now, if you're in the EEA, setting your default browser will also cover more obscure link types like ftp and "read," plus a wider array of web-related file formats such as .mht, .svg, .xml, and even .pdf files, provided your chosen browser says it can handle them. The Bing app and those Windows Widgets, which previously had a nasty habit of ignoring your browser choice, will also start opening web links in your default browser. Hallelujah. Users in the EEA will also gain the ability to uninstall the Microsoft Store entirely later this year, though apps previously installed from it will still receive updates. Windows Search is also getting an upgrade in the EEA. Right now, searching from the taskbar mostly just sends you to Bing, no matter what browser you use. But for users in the EEA, other apps will be able to plug into Windows Search and show web results too. If an app registers as a web search provider, it'll start working as soon as you install it. You'll also be able to see results from multiple providers in the search interface, not just Bing. The usual scoping tabs will still be there if you want to filter things, but the default view will be more varied. And yes, you'll even be able to reorder the providers in Settings. These changes are already in Windows Insider builds and are expected to roll out to Windows 10 and 11 in early June.
  • Recent Achievements

    • One Year In
      WaynesWorld earned a badge
      One Year In
    • First Post
      chriskinney317 earned a badge
      First Post
    • Week One Done
      Nullun earned a badge
      Week One Done
    • First Post
      sultangris earned a badge
      First Post
    • Reacting Well
      sultangris earned a badge
      Reacting Well
  • Popular Contributors

    1. 1
      +primortal
      172
    2. 2
      ATLien_0
      125
    3. 3
      snowy owl
      123
    4. 4
      Xenon
      118
    5. 5
      +Edouard
      92
  • Tell a friend

    Love Neowin? Tell a friend!