AmitDiwan has Published 10744 Articles

How to create a navigation bar with equal-width navigation links with CSS?

AmitDiwan

AmitDiwan

Updated on 03-Apr-2020 10:47:08

1K+ Views

Following is the code to create a navigation bar with equal-width navigation links.−Example Live Demo Document body{    margin:0px;    margin-top:60px;    padding: 0px; } *, *::before, *::after{    box-sizing: border-box; } nav{    position: fixed;    top: 0;    width: 100%;    background-color: rgb(39, 39, ... Read More

How to create a navigation bar with a centred link/logo with CSS?

AmitDiwan

AmitDiwan

Updated on 03-Apr-2020 10:43:53

410 Views

Following is the code to produce a navigation bar with a centered link/logo −Example Live Demo Document body{    margin:0px;    margin-top:60px;    padding: 0px; } nav{    position: fixed;    top:0;    width: 100%;    background-color: rgb(251, 255, 196);    overflow: auto;    height: auto; ... Read More

How to create a horizontal scrollable menu with CSS?

AmitDiwan

AmitDiwan

Updated on 03-Apr-2020 09:19:49

711 Views

Following is the code to produce a horizontal scrollable menu with CSS −Example Live Demo Document body{    margin:0px;    margin-top:10px;    padding: 0px; } nav{    width: 100%;    background-color: rgb(39, 39, 39);    overflow: auto;    height: auto;    white-space: nowrap; } .links { ... Read More

How to create a Hoverable Sidenav with CSS?

AmitDiwan

AmitDiwan

Updated on 03-Apr-2020 09:09:33

386 Views

Following is the code to create hoverable side navigation buttons with CSS.Example Live Demo Document nav a {    position: fixed;    left: -120px;    transition: 0.3s;    padding: 10px;    width: 140px;    text-decoration: none;    font-size: 20px;    color: black;    font-weight: bolder;   ... Read More

How to create a responsive side navigation menu with CSS?

AmitDiwan

AmitDiwan

Updated on 03-Apr-2020 08:51:56

815 Views

Following is the code to create a responsive side navigation menu with CSS −Example Live Demo body {    margin: 0;    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } nav {    margin: 0;    padding: 0;    width: 150px;    background-color: #2f77e4;    position: fixed; ... Read More

How to create a responsive navigation menu with icons, using CSS?

AmitDiwan

AmitDiwan

Updated on 03-Apr-2020 08:10:39

819 Views

Following is the code for creating the responsive navigation menu with icons.Example Live Demo Document body{    margin:0px;    margin-top:10px;    padding: 0px; } nav{    width: 100%;    background-color: rgb(39, 39, 39);    overflow: auto;    height: auto; } .links {    display: inline-block;   ... Read More

How to create a responsive navigation menu with a login form inside it?

AmitDiwan

AmitDiwan

Updated on 03-Apr-2020 08:01:47

1K+ Views

Following is the code to create a responsive navigation menu with a login form inside of it −Example Live Demo Document body {    margin: 0px;    margin-top: 10px;    padding: 0px; } nav {    width: 100%;    background-color: rgb(39, 39, 39);    overflow: auto; ... Read More

How to create a Menu Icon with CSS?

AmitDiwan

AmitDiwan

Updated on 03-Apr-2020 07:30:34

933 Views

To create a Menu Icon with CSS, the code is as follows −Example Live Demo div {    width: 40px;    height: 7px;    background-color: blue;    margin: 5px 2px; } > Sample Menu Icon OutputThis will produce the following output −

MongoDB query to add multiple documents

AmitDiwan

AmitDiwan

Updated on 02-Apr-2020 14:31:11

221 Views

To perform multiple write operations, use bulkWrite(). Let us create an array list values. Following is the query −> const arrayList = [ ...    {"Value1":100, "Value2":200, "Name": "John"}, ...    {"Value1":100, "Value2":200, "Name": "Bob"} ... ]; > let op1 = []; > arrayList.forEach(({ Value1, Value2, Name }) => { ... Read More

Perform $lookup to array of object id's in MongoDB?

AmitDiwan

AmitDiwan

Updated on 02-Apr-2020 14:28:05

2K+ Views

For this, use $lookup. This performs a left outer join to an unsharded collection in the same database to filter in documents from the “joined” collection for processing.Let us first create a collection with documents −> db.demo395.insertOne({Name:"Chris"}); {    "acknowledged" : true,    "insertedId" : ObjectId("5e5e782317aa3ef9ab8ab207") } > db.demo395.insertOne({Name:"David"}); { ... Read More

Advertisements