Jump to content
Stef's Coding Community
Sign in to follow this  
ctzn_erased

Anchor Tags Slide Content Off Of Page [Help!]

Recommended Posts

I've made a site, which uses Java.

Now I'm working on a non-Java version.

 

My main navbar was being used to slide entire pages in and out, from the left and the right, but in this new non-java version, they simply link to a selection of anchor tags up and down the page, and this sliding functionality is also disabled.

 

However, when a link is clicked, although it goes to the right place on the page, by scrolling up to the top, or down to the bottom, it is clear that the entire page has moved up about 100-150px, cutting off the top of the header, and lifting the footer from the base of the page. I'm really confused.

Clicking the "Back to top" anchor, reverts the page to the correct view, but I can't just assume people will do that every time.

 

Here is a link to the site.

http://createstudios09.netne.net/wordpress/

When you view it, remember to have Java DISABLED and reload the page.

Then click in the subnav (Inclusion/Youth/Commissions) and scroll up and down to see the effects.

 

I know it looks like a mess but the full site uses a lot of Java to hide all the extra content.

 

So yeah, any ideas why these anshors are doing this?

I found two other posts on the entire interweb that had similar issues, and nobody seemed to have a working solution.

Share this post


Link to post
Share on other sites

In Firefox PC and Mac the entire contents slide horizontally and the header stays in place. However in IE7 and 8 nothing at all happens.

Share this post


Link to post
Share on other sites

Well, have you disabled Javascript and then visitted the site?

If you're seeing things sliding in Firefox, then you have Java enabled.

You can only see the issue I'm having if it's disabled.

 

If the background is black, Java is enabled, and you won't be able to see.

If the background is sky blue, click Inclusion/Youth/Commissions and scroll up to the top.

Share this post


Link to post
Share on other sites

Java or JavaScript? They are two totally different things, and Java is not the abbreviation for JavaScript. I've disabled each and both and think you mean JavaScript. (and then I wondered why THIS page wasn't working right.....)

 

The reason you're jumping to the bookmarks within the site is that you're linking to them:

Inclusion

the #inclusion is a link to a bookmark, not a new page.

Share this post


Link to post
Share on other sites

I know it's a bookmark, I want it to go to the bookmark when JavaSCRIPT is disabled.

 

But once it has gone there, the header is off the top of the page and the footer is up off the bottom.

 

Anyway, I've thought of a cheeky workaround that involves replicating a page and using a

html redirect.

 

Thanks anyway.

Share this post


Link to post
Share on other sites

Off course the header is off the top and the footer is up- because your target - the bookmark, is in the middle of the page somewhere. If you want to see whatever it is right underneath your header, load a new page.

 

I'm not sure that you can create an entire division that'll appear right under your header on-click without disturbing the entire page. The real experts here might know a way.

Share this post


Link to post
Share on other sites

As Thelma said Java and Javascript are two different things. In your first post you said

"When you view it, remember to have Java DISABLED and reload the page."

That is exactly what I did.... and could not see your problem, however with Javascript disabled I can see it, big difference.

 

With or without Javascript enabled, if you go to http://createstudios09.netne.net/wordpress/#youth, your page is still cut off at the top, so I would presume that your issue is within the css. Adding padding-top: 100px; to your header div pushes the page down.

Share this post


Link to post
Share on other sites

Looks like I was focusing on the wrong thing - I see the pushed footer and header now. Overall, you have around 250 validation errors in your code - that's never a good thing and any one of them could cause all kinds of issues in all kinds of browsers / versions. You should really clean this up.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...