borkweb / BootstrapMediaWiki

A MediaWiki skin using Bootstrap 4 & FontAwesome 4
Apache License 2.0
266 stars 249 forks source link

TOC(position is not OK) #20

Open sunorry opened 11 years ago

sunorry commented 11 years ago

When I click a title(TOC), the content allways be a little down. Like this: http://eotl.borkweb.com/view/Forester_Guild#Directions When I click Directions image It should be there. image

sunorry commented 11 years ago

It is absolutely not a good way. Because I don't understand PHP. But it can solve the bug. I still wish the author solve the bug. image

sunorry commented 11 years ago

Why I use 'getElementById'? Cause Chinese. Href will be like this. href="#E5.Y3.D8.E2..." so, I have to use the js method.

Mithgol commented 11 years ago

With jQuery.localScroll, you may do the following:

$.localScroll({
   hash: true,
   offset: { top: -90 },
   onAfter: function(target){
      location = '#' + ( target.id || target.name );
   }
});

(The top value is either -90 or 90, I don't remember precisely whether the offset should be positive or negative in this case.)

borkweb commented 11 years ago

@Mithgol, thanks I'll give that a look-see soon!

sunorry commented 11 years ago

@borkweb Not fixed the bug?

borkweb commented 10 years ago

This bug has been fixed in master with the latest upgrade to Boostrap 3!

I was able to fix this with CSS without creating unnecessary whitespace. Setting the margin and padding to account for the position: fixed; elements. Here's what I did if anyone is curious.

koalasc commented 10 years ago

Hi borweb ,

The modification works perfectly but now the links are not clickable on the page

borkweb commented 10 years ago

Great catch. I was able to reproduce the problem and resolve it. Let me know if you continue to run in to problems!

poikilotherm commented 10 years ago

I think this maybe related to my bug #33, I did not check on this bug beforehand (as I did not see it related to the TOC...).

vinyanalista commented 8 years ago

@borkweb said:

This bug has been fixed in master with the latest upgrade to Boostrap 3!

I was able to fix this with CSS without creating unnecessary whitespace. Setting the margin and padding to account for the position: fixed; elements. Here's what I did if anyone is curious.

As a matter of fact, it works. I used those CSS lines to fix that same issue on another theme that combines Bootstrap and MediaWiki, Tweeki:

.mw-headline {
    text-shadow: 1px 1px 0 rgb(255,255,255);
}

h2 .mw-headline { font-size: 18px; }
h3 .mw-headline { font-size: 16px; }
h4 .mw-headline { font-size: 14px; }
h5 .mw-headline { font-size: 12px; }
h6 .mw-headline { font-size: 12px; }

But, at least for me, I'm not a CSS expert, those lines are the kind of thing that can not be explained, they just work, like magic! XD