11
votes

Forcer la barre de défilement verticale à afficher dans IE8

La barre verticale n'apparaît pas dans IE8 si la page n'est pas suffisamment longue. Dans FF, il y a une solution de contournement pour ce xxx

J'ai essayé ce qui suit pour IE8: Overflow: défilement; mais la barre de défilement apparaît des deux côtés. Je ne veux que pour la verticale et non horizontale. Scroll-y ne fonctionne pas.

Toute solution?


0 commentaires

12 Réponses :


19
votes

oh le figuré. Son xxx


1 commentaires

Cela ne fonctionne pas non plus pour IE8 et plus tôt selon le site Web W3school.



3
votes

Une autre solution consiste à définir la hauteur du corps à 100% - voir A avant / après l'exemple de http://www.ecustomizer.com/msmvp/htmlheightest.htm


0 commentaires

8
votes

J'utilise ce qui suit:

html {
    height: 101%; /* setting height to 101% forces scroll bar to display */
}


0 commentaires

7
votes

essayer

-ms-overflow-y: défilement;


0 commentaires

4
votes

Mettez-le dans votre div i.e. xxx

par exemple: xxx


0 commentaires

1
votes
html {height: 100%; margin-bottom: 1px;}
Makes your page always 1px longer so the scroll bars always appear and only adds 1px scroll to pages that are not long enough so it doesn't make the viewer think they are missing something and scroll down for no reason.  Simple and works in all main stream browsers (that i tested)

0 commentaires

2
votes

html, corps { Hauteur: 100,1%; }


0 commentaires

0
votes
html {
    height: 100%;
    border-bottom: 1px #999 solid;
}
NOTE: I wanted to force the scrollbar on pages that I KNOW will not need to scroll.  This solution is for such a situation.Jonesy's solution didn't work for me in all browsers, but I'm willing to have an insignificant 1px gray stripe which works consistently in all browsers.  To me it's better than showing a full 1% extra (chip's solution).  Design wise, it's hardly even a concession because it's so insignificant - try it and see what I mean.Also, this solution is going to be super future-proof.  If you want to add blank space like the other solutions, there's no telling what optimizations will get built into future browsers and I could imagine some browser detecting wasted blank space and eliminating it (stranger things have happened).  By conceding 1px, you are forcing the browser to deal with this 1 pixel no matter what.

0 commentaires

2
votes

Meilleure réponse à la date (mai 2012) Pour forcer la barre de défilement verticale dans Safari, Opera & Firefox est la suivante:

html {
    height: 101%; /* setting height to 101% forces scroll bar to display */
}
html { min-height: 100%; padding-bottom: 1px; }


0 commentaires

1
votes

notant juste que Normalize.css a recommandé:

html { overflow-y: scroll; }


0 commentaires

0
votes

Ajouter Overflow: Auto en CSS pour la balise HTML.


0 commentaires

0
votes

Bien voir mon code, le jeu de données est à l'intérieur de 1 div xxx


0 commentaires