vendredi 26 juillet 2019

Y-axis scrolling in css?

I can't get the scroll-bar to actually scroll on either axis

I've tried added the "overflow-y" property but that just makes the scroll bar appear, it doesn't actually let me scroll. I added the html file but removed all the content except what has to do with styling.

html

    <html lang="en">
    <head>
    <title>Experience</title>
    <script type="text/javascript" src="JSFolder/jquery-3.4.1.min.js"></script>
    <script type="text/javascript"></script>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=devic-width, initial-scale=1">
    <link rel = "stylesheet" href = "exp.css">
    <script src="http://code.jquery.com/jquery-latest.min.js"></script>
        <script>
          $(function() {
        $("#visible").click(function() {
            $('#invisible').toggleClass("show");
          });  
        });
          $(function() {
        $("#visible1").click(function() {
            $('#invisible2').toggleClass("show");
          });  
        });
            $(function() {
        $("#visible2").click(function() {
            $('#invisible3').toggleClass("show");
          });  
        });
        $(function() {
        $("#visible3").click(function() {
            $('#invisible4').toggleClass("show");
          });  
        });
        $(function() {
        $("#visible4").click(function() {
            $('#invisible5').toggleClass("show");
          });  
        });
        $(function() {
        $("#visible6").click(function() {
            $('#invisible6').toggleClass("show");
          });  
        });
        $(function() {
        $("#visible7").click(function() {
            $('#invisible7').toggleClass("show");
          });  
        });
        $(function() {
        $("#visible8").click(function() {
            $('#invisible8').toggleClass("show");
          });  
        });
        </script>
        <style>
          .hide{display:none;}
          .show{display:block; color:#769EA8;}
          .push{top:350%;}
        </style>
    </head>
    <body class="body">
        <div class="background">
        </div>
        <div class="fr">
            <a href="exp.html" class="active">fr</a>
        </div>
        <div class="NavBar">
            <h1 id="experience">.</a>
        </div>
        <div id="mySidenav" class="sidenav">
        </div>
            <div>...
            </div>
        <span style="font-size:30px;cursor:pointer;color:#EBEDFA;position:fixed;left:5px" onclick="openNav()">&#9776;</span>
        <script src="http://code.jquery-3.com/jquery-latest.min.js"></script>
        <script type="text/javascript">
            function openNav(){
                document.getElementById("mySidenav").style.width = "200px";
            }

            function closeNav() {
                document.getElementById("mySidenav").style.width = "0";
            }
        </script>
        <style>
            .hide{display:none;}
            .show{display:block;}
        </style>
    </body>
    </html>

css:

    body{
        position: relative;
        font-family: sans-sherif;
        background-color: #242424;
        overflow-y: scroll;
    }

    .NavBar{
        position: fixed;
        top: 8%;
        left: 26.5%;
        width: 100%
    }

    #experience{
        position: absolute;
        color: #EBEDFA;
        padding-right: 2%;
        padding-left: 2%;
        font-size: 35px;
        left: 14.5%;
    }


I want to be able to scroll if for example I make the browser small or if the browser is not big enough to show all of the content.




Aucun commentaire:

Enregistrer un commentaire