css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

	<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"/>

    <ul class='nav_bar'>
<li><a href="https://www.wikipedia.org/" target="_blank"> <img class="wikilogo" src="https://upload.wikimedia.org/wikipedia/en/8/80/Wikipedia-logo-v2.svg" alt="wikipedia logo"></a></li>
<li><p class="wikititle">Wikipedia Viewer</p></li>
<li><form id="searchform">
<input type="text" name="search" placeholder="Search..." id="inputsearch">
<button class="buttonsearch" type="submit"><i class="fa fa-search"></i></button>
<li><div id="lineid" class="linediv"><span class="buttonspan"><a href="https://en.wikipedia.org/wiki/Special:Random" target="_blank"><button class="buttonrandom" type="button"><i class="fa fa-random"></i>  Random Articles</button></a></span></div></li>

	<div class="contentcontainer">
	<div class="row" id = "footer">

    <div class = "col-xs-12 col-md-12 creditdiv">
    	<p class = "credit"><i class="fa fa-copyright"></i> Designed and Coded by MONSTU 2017</p>


.wikilogo {
	margin: 50px 0 10px 0;
	width: 200px;

.wikititle {
	font-size: 25px;

.nav_bar {
	list-style: none;
	text-align: center;
	transition: 0.5s ease-in-out;
	margin: 0 auto 0 auto;
	padding: 0 0 40px 0;

#inputsearch {
	transition: 0.5s ease-in-out;
	margin: 0 0 20px 0;
	padding: 2px;
	border: none;
  border-bottom: 2px solid #3269c1;

#inputsearch:focus {
	background-color: white;

.buttonsearch {
	color: white;
	background-color: #3269c1;
	padding: 4px 10px 4px 10px;
	border: none;
	border-radius: 3px;

.buttonspan {
	padding: 0 20px;
	background: white;

.buttonsearch:hover {
	transition: 0.3s ease-in-out;
	background-color: #4386f2;

.linediv {
	margin: 20px auto 0 auto;
	width: 390px;
	height: 15px;
	border-bottom: 0.3px solid #c4c5c6;
	text-align: center;

.buttonrandom {
	background-color: #f2f4f7;
	padding: 4px 10px 4px 10px;
	color: #3269c1;
	border-style: solid;
	border-width: 0.1px; 
	border-color: #c4c4c4;
	border-radius: 2px;

.thedisplay {
	display: inline-block;
	margin: 0 0 0 5px;

.sticky {
	width: 100%;
  top: 0;
  transition: 0.5s ease-in-out;
	position: fixed;
	padding: 10px 0 0 0;
	background-color: white;
	box-shadow: 2px 0 3px grey;


.contentdiv {
	width: 80%;
	margin: auto;

.contenttitle {
	font-size: 30px;
	color: black;

.contentpage {

.contentpadding {
	padding: 170px 0 0 0;


#footer {
  text-align: center;
  width: 100%;
  color: grey;
	padding: 0;
	margin: 15px 0 6px 0;
	display: none;

hr {
  width: 95%;
  margin: 0 auto;
	border: none;
	height: 0.5px;
	background-color: #c4c5c6;

.credit {
	text-align: center;
  margin: 0;
  padding: 4px;
	font-size: 14px;


//----------SEARCH ARTICLE-------//
	var searchURL = 'https://en.wikipedia.org/w/api.php?action=opensearch&format=json&search=' + document.getElementById("inputsearch").value + '&limit=10&origin=*';
	if ($('div').hasClass('contentdiv')) {
	url: searchURL,
  success: function(data) {
		if (data[1][1] == undefined){
				alert('Sorry, we cannot find your search result.');
				} else {
					for (var i=0; i < 10; i++){

      $('.contentcontainer').append("<div class='contentdiv content"+i+"'><a target='_blank' class='contenttitle' href="+"'"+data[3][i]+"'"+">"+data[1][i]+"</a><p class='contentpage'>"+data[2][i]+ ' ' + "<a target='_blank' href="+"'"+data[3][i]+"'"+">Read More</a>" + "</p></div>");


    var menu = $('.nav_bar');
    var origOffsetY = 70;

    function scroll() {
        if ($(window).scrollTop() > origOffsetY) {
          $('.nav_bar li').addClass('thedisplay');
					$('.wikilogo').css({'width': '50px',
															 'margin': '0 30px 0 0',
					$('#inputsearch').css('width', '350px');
        } else {
            $('.nav_bar li').removeClass('thedisplay');
					  $('.wikilogo').css({'width': '200px',
															 'margin': '50px 0 10px 0',
					$('#inputsearch').css('width', '350px');
	document.onscroll = scroll;

//when scroll down
//navbar turn into display:inline-block
//fixed top navbar and using float left and clear
//smaller image
//200px or 300px//
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................