Articles on Trending Technologies

Technical articles with clear explanations and examples

Float List Items to the right with CSS

Daniol Thomas
Daniol Thomas
Updated on 15-Mar-2026 3K+ Views

The CSS float: right property allows you to align list items to the right side of their container. This is commonly used for creating navigation menus where some items appear on the left and others on the right. Syntax li { float: right; } Example: Floating List Items to the Right The following example demonstrates how to float specific list items to the right while keeping others on the left − ul ...

Read More

What are Floating List Items in CSS

seetha
seetha
Updated on 15-Mar-2026 690 Views

Floating list items in CSS allow you to create horizontal navigation bars and multi-column layouts by making list items flow side by side instead of stacking vertically. The float property removes elements from the normal document flow and positions them to the left or right of their container. Syntax li { float: left | right | none; } Possible Values ValueDescription leftFloats the element to the left side rightFloats the element to the right side noneDefault value, no floating applied Example: Horizontal Navigation Bar The following ...

Read More

What are the differences between bitwise and logical AND operators in C/C++

Arnab Chakraborty
Arnab Chakraborty
Updated on 15-Mar-2026 8K+ Views

In C, the bitwise AND (&) and logical AND (&&) operators serve different purposes and work with different data types. Understanding their differences is crucial for correct C programming. Syntax // Bitwise AND result = operand1 & operand2; // Logical AND result = condition1 && condition2; Bitwise AND Operator (&) The bitwise AND (&) operator performs a bit-by-bit AND operation between two integers. It works on integer types and returns the same data type. Each corresponding bit is AND-ed according to these rules − 1 & 1 = 1 ...

Read More

Create a Horizontal Navigation Bar with CSS

George John
George John
Updated on 15-Mar-2026 4K+ Views

To create a horizontal navigation bar with CSS, you need to change the default vertical display of list items to horizontal. The key is using display: inline or display: inline-block on the elements to arrange them side by side. Syntax li { display: inline; } /* Or for more control */ li { display: inline-block; } Method 1: Using Display Inline The following example creates a basic horizontal navigation bar using display: inline − ...

Read More

C Program Coin Change

sudhir sharma
sudhir sharma
Updated on 15-Mar-2026 4K+ Views

In this problem, we are given a value n, and we want to make change of n rupees using a given set of coin denominations. We need to return the total number of ways to make the sum using these coins. Syntax int coinChange(int coins[], int numCoins, int amount); Example Input/Output Input: N = 6, coins = {1, 2, 4} Output: 6 Explanation: The total combinations that make the sum of 6 are: {1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 2}, {1, 1, 2, 2}, {1, 1, 4}, {2, 2, ...

Read More

What are Inline List Items in CSS

Sreemaha
Sreemaha
Updated on 15-Mar-2026 3K+ Views

Inline list items in CSS are created by setting the display property to inline for list elements (). This transforms vertically stacked list items into horizontally arranged elements, making them perfect for creating navigation bars and horizontal menus. Syntax li { display: inline; } Example: Creating a Horizontal Navigation Bar The following example demonstrates how to create a horizontal navigation bar using inline list items − ul { list-style-type: none; ...

Read More

C / C++ Program for Dijkstra\'s shortest path algorithm

sudhir sharma
sudhir sharma
Updated on 15-Mar-2026 27K+ Views

Dijkstra's algorithm is a greedy algorithm used to find the shortest path from a source vertex to all other vertices in a weighted graph. It works by maintaining a set of vertices whose shortest distance from the source has been determined and gradually expanding this set until all vertices are included. Syntax void dijkstra(int graph[V][V], int source); Algorithm Steps Step 1: Create a set to store vertices included in shortest path tree Step 2: Initialize all distances as INFINITE and source distance as 0 Step 3: Loop until all vertices are processed: ...

Read More

Set a border around navbar with CSS

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 9K+ Views

To set a border around navbar with CSS, is an easy task and can be easily achieved using CSS properties. In this article, we will learn three different approaches for setting a border around navbar with CSS. Syntax /* Using border property */ .navbar { border: width style color; } /* Using outline property */ .navbar { outline: width style color; } /* Using box-shadow property */ .navbar { box-shadow: 0 0 0 width color; } Method 1: Using border Property ...

Read More

Binary to Gray code using recursion in C program

sudhir sharma
sudhir sharma
Updated on 15-Mar-2026 2K+ Views

A Binary number is a number that has only two bits 0 and 1. Gray code is a special type of binary number that has a property that two successive numbers of the code cannot differ by more than one bit. This property of gray code makes it useful in K-maps, error correction, communication, etc. This makes the conversion of binary to gray code necessary. So, let's see an algorithm to convert binary to gray code using recursion. Syntax int binaryToGray(int binary); Algorithm Step 1: For input n: Step ...

Read More

Marginal Product Formula

Bitopi Kaashyap
Bitopi Kaashyap
Updated on 15-Mar-2026 582 Views

The marginal product formula measures the change in total output when one additional unit of a production factor (labor, machinery, capital) is added. It helps businesses predict whether adding resources will increase production efficiently. Formula $$\mathrm{Marginal\:Product = \frac{Q^{n} - Q^{n-1}}{L^{n} - L^{n-1}}}$$ Where − Qn − Current total production output Qn-1 − Previous production output (before the change) Ln − Current number of production units (workers, machines) Ln-1 − Previous number of production units Step-by-Step Calculation Consider an ice cream manufacturer that produces 10, 000 cones/day with 3 employees. After hiring 2 ...

Read More
Showing 21171–21180 of 61,297 articles
Advertisements