Brainerd scroller
How do I make an brainerd scroller?
Quick reminder on how to display a variable sized scroller / nav bar, which adapts to the size of the container when there are few items.. What is a brainerd scroller? How do you make a brainerd scroller? This script and codes were developed by António Capelo on 15 December 2022, Thursday.
Brainerd scroller - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Brainerd scroller</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"> <div class="menu-container"> <ul class="menu"> <li><a class="selected "href="#">Yah, that's a good one </a></li></li> <li><a href="#">Yeah? </a></li></li> <li><a href="#">Yeah. </a></li></li><li><a href="#">You alright there, Margie? </a></li></li> <li><a href="#">Where's my daughter? </a></li></li> <li><a href="#">No Jean, no money! </a></li></li> <li><a href="#">Who's Jean?</a></li></li> <li><a href="#">Three-cent stamp. </a></li></li> </ul> </div> <div class="content"> <div class="titles"> <h1>Welcome</h1> <h2>to Brainerd</h2> <h3 class="click">Click to reduce the number of menu items</h3> </div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Brainerd scroller - Script Codes CSS Codes
@import url(https://fonts.googleapis.com/css?family=Lato);
* { font-family: 'Lato', sans-serif;
}
.container { position: relative; border: 1px solid black; width: 400px; margin: 20px auto; height: 100%;
}
.menu-container { overflow-x: auto; display: block;
}
.menu a { display: block; padding: 10px; text-align: center; white-space: nowrap;
}
.menu { margin: 0; padding: 0; list-style-type: none; display: table; width: 100%;
}
.menu li { display: table-cell; color: white; text-align: center; border-right: 1px solid white;
}
.menu li:last-child { border: none;
}
.menu li:hover { background: violet;
}
a { text-decoration: none; color: white; background: #9F2125;
}
a.selected { background: white; color: black; font-weight: bold;
}
.menu-container { background: black;
}
body,
html { padding: 0; margin: 0; height: 80%;
}
.content { width: 100%; position: absolute; bottom: 0; top: 40px;
}
h1 { font-size: 3rem; margin: 0;
}
h2 { width: 50%; font-size: 0.9rem; margin: 0 auto; color: black;
}
h3 { font-size: 0.6rem;
}
h3:hover { cursor: pointer;
}
h1 { color: #9F2125;
}
.titles { position: absolute; width: 100%; top: 50%; transform: translateY(-50%); text-align: center;
}
Brainerd scroller - Script Codes JS Codes
$('a').click(function(ev){ $('a').each(function(i, e) { $(this).removeClass('selected'); }); $(ev.currentTarget).addClass('selected');
})
$('.click').click(function(ev) { var as = $('.menu li'); as[as.length-1].remove();
})
Developer | António Capelo |
Username | capelo |
Uploaded | December 15, 2022 |
Rating | 3 |
Size | 3,165 Kb |
Views | 12,144 |
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!
Name | Size |
Menu with following underline | 2,648 Kb |
Analog Clock | 2,896 Kb |
Clock loading | 2,351 Kb |
Max-height transition | 2,643 Kb |
ToDo | 8,475 Kb |
Camera click | 1,963 Kb |
Gif as page background | 3,521 Kb |
React Boilerplate | 1,457 Kb |
8-Bit Avatar | 2,527 Kb |
Full-width slider. | 3,886 Kb |
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!
Name | Username | Size |
Animated Donut Chart | Jplhomer | 3,808 Kb |
A vuejs widget | Chrgl86 | 2,869 Kb |
CSS3 Form Page Design | Rssatnam | 3,613 Kb |
Toggle Time | Petebot | 5,345 Kb |
Practice using Wixel | Emnk | 3,057 Kb |
Vue.js Starter | Andymerskin | 1,268 Kb |
Lecture 1 | Law | 0 Kb |
Twinner Spinner II | Katydecorah | 2,974 Kb |
Placeholder support for contentEditable elements, without JavaScript | Flesler | 1,863 Kb |
Scarlett Johansson Tribute Page | Diomed | 3,233 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!