After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 618379 - Navigation is hiding anchors title
Navigation is hiding anchors title
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: 1.16
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2010-05-11 16:06 UTC by Marc-Andre Lureau
Modified: 2010-10-16 21:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test page (2.54 KB, text/html)
2010-05-13 08:29 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
  Details
test css (587 bytes, text/css)
2010-05-13 08:30 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
  Details
Corrected style file (609 bytes, text/css)
2010-10-16 16:57 UTC, José Aliste
  Details
Corrected html file (2.68 KB, text/html)
2010-10-16 16:58 UTC, José Aliste
  Details
Don't hide anchor links when navigating. (878 bytes, patch)
2010-10-16 18:39 UTC, José Aliste
committed Details | Review

Description Marc-Andre Lureau 2010-05-11 16:06:56 UTC
Top position fixed table for navigation is annoying when using anchors links.

Usually, the title is often hidden by the navigation table, leaving the user wondering where he ended up. Even an exercised user can be annoyed :)

There might be some Css tricks to fix that, but we should probably avoid fixed offset or javascript, although that would be better than the current situation.
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2010-05-11 16:21:44 UTC
It is using css. I was fixing the offsets with firebug once. but noticed that browsers seems to have changed :/
I like it either, but I don't have time right now to do that once again.
Comment 2 Marc-Andre Lureau 2010-05-11 16:34:59 UTC
Let see if a desperate soul find a nice answer:
  
http://stackoverflow.com/questions/2812503/fixed-top-element-and-anchors
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2010-05-12 13:24:57 UTC
Marc-Andre, its a bit weired - in firefox (3.5.9) this works fine for me. In devhelp (0.23) and epiphany (2.28.0) there is an offset. I already use this to correct the position.

/* this is needed so that the local anchors are displayed below the naviagtion */
div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name]
  {
    position: relative;
    padding-top:4.5em;
  }

The suggestion in stackoverflow don't help. What browser did you used?
Comment 4 Marc-Andre Lureau 2010-05-12 13:48:36 UTC
devhelp 2.30.0-1 from debian, linked with webkit.
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2010-05-13 08:29:04 UTC
Created attachment 160953 [details]
test page
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2010-05-13 08:30:01 UTC
Created attachment 160954 [details]
test css

The attached two attachements form a minimal example. If someone can make it work across the browsers I can fix it in gtk-doc accordingly.
Comment 7 José Aliste 2010-10-16 16:57:25 UTC
Created attachment 172496 [details]
Corrected style file

This fixes the problem and works in Firefox, Webkit (Safari, Chrome) and IE7+. Not tested in Opera.
Comment 8 José Aliste 2010-10-16 16:58:50 UTC
Created attachment 172497 [details]
Corrected html file
Comment 9 José Aliste 2010-10-16 17:09:15 UTC
We also tested the files in Opera and they work well. The files I attached were done by Rodrigo Aliste.
Comment 10 José Aliste 2010-10-16 18:39:13 UTC
Created attachment 172501 [details] [review]
Don't hide anchor links when navigating.

Fixes bug #618379.
Comment 11 Stefan Sauer (gstreamer, gtkdoc dev) 2010-10-16 21:38:15 UTC
commit c42c99bfb823d7c78bf4de5e925029232a171998
Author: Rodrigo Aliste <raliste@googlemail.com>
Date:   Sat Oct 16 15:36:51 2010 -0300

    css: Don't hide anchor links when navigating.
    
    Fixes bug #618379.
Comment 12 Stefan Sauer (gstreamer, gtkdoc dev) 2010-10-16 21:38:34 UTC
Comment on attachment 172501 [details] [review]
Don't hide anchor links when navigating.

Thanks a lot!