Problem with anchors

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Thu Oct 31, 2013 3:32 pm
Reply with quote
Report this post
Hello,

I've put some anchors on my website's pages for going from a menu (at the top of the page) to differents places of the page. But when I click on the menu links, the anchors don't work properly, and the links don't go to the exact place of the page: they almost always go some lines under the correct position.

How could I solve this problem.

my web site "www.sevengraphix.com"

Anchors with problems. (Novedades, Productos and Quienes somos)

Thank you.
User avatar
Expert Boarder

GK User
Thu Oct 31, 2013 4:20 pm
Reply with quote
Report this post
Well, sadly there is no 100% way to do that. To understand why You need to know how anchors work and why they don't work well with Creativity ;).
When You create element with ID, and anchor link to that ID browser scrolls the page, so top of the html element with that particular ID reach top of browsers viewport.
Now on creativity there is a floating menu that hide some part of the viewport - so it also hides the content after scrolling to the anchor position.
To avoid that problem, on home page we are using big top padding of elements that we scroll to. You can easily use the same method:
Code: Select all
#gkBottom1 .box{
padding: 102px 0!important;
}


102px of top padding is enough.

Another method would be to catch anchor menu links click with javascript, prevent browser scrolling and scroll with JS + use offset so the element is right where it should be.
User avatar
Moderator

GK User
Thu Oct 31, 2013 5:27 pm
Reply with quote
Report this post
Sorry but Im new on this, where could I found that code to modified?

#gkBottom1 .box{
padding: 102px 0!important;
}

thank you.
User avatar
Expert Boarder

GK User
Thu Oct 31, 2013 5:57 pm
Reply with quote
Report this post
This is just a sample css code fragment. Jf You would like to apply same padding on your elements, use override.css and enable it in template settings.
User avatar
Moderator

GK User
Thu Oct 31, 2013 6:37 pm
Reply with quote
Report this post
Thank you,

It works perfectly
User avatar
Expert Boarder

GK User
Sat Nov 02, 2013 11:32 am
Reply with quote
Report this post
If You will have any other questions, feel free to post new forum threads.
I'm closing the topic.
User avatar
Moderator


cron