Sylvester
Sylvester

Reputation: 195

Slider with tabs under banner image

I'm looking for slider similar to: enter image description here

I have created use materializecss but when I put this code on our website then this code destroyed all styles in our website.

Can anyone have any solution how to solve or any other solution for this slider?

<!DOCTYPE html>
<html>
   <head>
      <title>The Materialize Tabs Example</title>
      <meta name = "viewport" content = "width = device-width, initial-scale = 1">      
      <link rel = "stylesheet"
         href = "https://fonts.googleapis.com/icon?family=Material+Icons">
      <link rel = "stylesheet" 
         href = "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css">
      <script type = "text/javascript"
         src = "https://code.jquery.com/jquery-2.1.1.min.js"></script>           
      <script src = "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js">
      </script> 
   </head>
   
   <body class = "container"> 
      <div class = "row">

         
         <div id = "inbox" class = "col s12"><img src="https://iv.pl/images/52b0f0c1074fd3b882aeb3f7f5460ee5.png"></div>
         <div id = "unread" class = "col s12"><img src="https://iv.pl/images/52b0f0c1074fd3b882aeb3f7f5460ee5.png"></div>
         <div id = "outbox" class = "col s12"><img src="https://iv.pl/images/52b0f0c1074fd3b882aeb3f7f5460ee5.png"></div>
         <div id = "sent" class = "col s12"><img src="https://iv.pl/images/52b0f0c1074fd3b882aeb3f7f5460ee5.png"></div>
                  <div class = "col s12">
            <ul class = "tabs">
               <li class = "tab col s3"><a href = "#inbox">Inbox</a></li>
               <li class = "tab col s3"><a class = "active" href = "#unread">
                  Unread</a></li>
               <li class = "tab col s3"><a href = "#outbox">
                  Outbox (Disabled)</a></li>
               <li class = "tab col s3"><a href = "#sent">Sent</a></li>
            </ul>
         </div>
      </div> 
   </body>
</html>

Upvotes: 1

Views: 586

Answers (1)

Igor Zubenko
Igor Zubenko

Reputation: 51

This tabs has swipebable option. I've enabled it and update materialize to v1.

    <!DOCTYPE html>
    <html>
    <head>
      <title>The Materialize Tabs Example</title>
      <meta name = "viewport" content = "width = device-width, initial-scale = 1">      
      <link rel = "stylesheet"
         href = "https://fonts.googleapis.com/icon?family=Material+Icons">
      <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
    </head>
    <body class = "container"> 
      <div class = "row">
         <div id = "inbox" class = "col s12"><img src="https://iv.pl/images/52b0f0c1074fd3b882aeb3f7f5460ee5.png"></div>
         <div id = "unread" class = "col s12"><img src="https://iv.pl/images/52b0f0c1074fd3b882aeb3f7f5460ee5.png"></div>
         <div id = "outbox" class = "col s12"><img src="https://iv.pl/images/52b0f0c1074fd3b882aeb3f7f5460ee5.png"></div>
         <div id = "sent" class = "col s12"><img src="https://iv.pl/images/52b0f0c1074fd3b882aeb3f7f5460ee5.png"></div>
                  <div class = "col s12">
            <ul class = "tabs">
               <li class = "tab col s3"><a href = "#inbox">Inbox</a></li>
               <li class = "tab col s3"><a class = "active" href = "#unread">
                  Unread</a></li>
               <li class = "tab col s3"><a href = "#outbox">
                  Outbox (Disabled)</a></li>
               <li class = "tab col s3"><a href = "#sent">Sent</a></li>
            </ul>
         </div>
      </div> 
     <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>         
     <script 
src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
    <script>
        $(document).ready(function(){
                $('.tabs').tabs({ swipeable: true });
        });
    </script>
    </body>
    </html>

Upvotes: 1

Related Questions