Scroll Horizontal, div to center V2

Developer
Size
2,026 Kb
Views
12,144

How do I make an scroll horizontal, div to center v2?

Testing. What is a scroll horizontal, div to center v2? How do you make a scroll horizontal, div to center v2? This script and codes were developed by Nathan Gregg on 25 December 2022, Sunday.

Scroll Horizontal, div to center V2 Previews

Scroll Horizontal, div to center V2 - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Scroll Horizontal, div to center V2</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <header> <nav class="menu"> <a href="#d1">d1</a> <a href="#d2">d2</a> <a href="#d3">d3</a> </nav>
</header>
<div id="container"> <div id="d1"> <div id="inner_d1">hello d1</div> </div> <div id="d2"> <div id="inner_d2">hello d2</div> </div> <div id="d3"> <div id="inner_d3">hello d3</div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Scroll Horizontal, div to center V2 - Script Codes CSS Codes

*{margin:0;padding:0;}
header { position: fixed; height: 30px; top: 0; width: 100%; border-bottom: 3px solid blue;
}
a { text-decoration: none; color: gray; flex-grow: 4; text-align: center;
}
#container { width: 300%; display: flex; flex-flow: row nowrap;
}
#d1 { width: 100%; border: 1px solid black;
}
#inner_d1 { margin: 0 auto; margin-top: 100px; margin-bottom: 100px; width: 50%; border: 3px solid green;
}
#d2 { width: 100%; border: 1px solid black;
}
#inner_d2 { margin: 0 auto; margin-top: 100px; margin-bottom: 100px; width: 50%; border: 3px solid green;
}
#d3 { width: 100%; border: 1px solid black;
}
#inner_d3 { margin: 0 auto; margin-top: 100px; margin-bottom: 100px; width: 50%; border: 3px solid green;
}

Scroll Horizontal, div to center V2 - Script Codes JS Codes

var $root = $('html, body');
$('.menu a').click(function() { $root.animate({ scrollLeft: $( $.attr(this, 'href') ).offset().left }, 500); return false;
});
Scroll Horizontal, div to center V2 - Script Codes
Scroll Horizontal, div to center V2 - Script Codes
Home Page Home
Developer Nathan Gregg
Username nathansonic
Uploaded December 25, 2022
Rating 3
Size 2,026 Kb
Views 12,144
Do you need developer help for Scroll Horizontal, div to center V2?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Nathan Gregg (nathansonic) Script Codes
Create amazing video scripts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!