Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
Change the size of the pagination with CSS
To change the pagination size in CSS, you can use the font-size property to make pagination elements larger or smaller. This affects both the text size and the overall visual impact of your pagination buttons. Syntax .pagination a { font-size: value; } Example: Large Pagination Buttons The following example creates pagination with increased size using font-size: 18px − .demo { display: inline-block; } .demo ...
Read MoreMaximum money that can be withdrawn in two steps in C
We are given two lockers, say L1 and L2 that have some amount of money in the form of coins. L1 has A coins and L2 has B number of coins in it. We have to withdraw money or coins from the lockers such that the money drawn out is maximum. Each time the coins are drawn from any locker, it is replaced by coins 1 less than its previous count. If we draw A coins from L1 then it will be replaced by A-1 coins and if we draw B coins from L2 then it will be replaced by ...
Read MoreAdd space between pagination links with CSS
Pagination links often appear too close together by default. Adding space between pagination links improves readability and provides better visual separation. This can be achieved using CSS properties like margin, padding, or gap. Syntax /* Method 1: Using margin */ .pagination a { margin: value; } /* Method 2: Using gap (for flex/grid containers) */ .pagination { display: flex; gap: value; } Method 1: Using Margin The following example adds space between pagination links using the margin property − ...
Read MoreMaximum difference between the group of k-elements and rest of the array in C
We are given an array of integers of size N and a number k. The array consists of integers in random order. The task is to find the maximum difference between the group of k-elements and rest of the array. The array will be divided into two parts. The first part is a group of k-elements taken out and the second part is the rest of the elements of the array. We have to select k elements such that the difference between the sum of elements in both groups is maximum. If k is smaller ( half of array ...
Read MoreUsage of CSS grid-column-gap property
The CSS grid-column-gap property is used to set the gap between columns in a CSS Grid layout. This property allows you to create space between grid columns without affecting the padding or margins of individual grid items. Syntax selector { grid-column-gap: value; } Possible Values ValueDescription lengthDefines the gap in px, em, rem, etc. %Defines the gap as a percentage of the container width normalDefault value, typically 0 Example The following example demonstrates how to create a 20px gap between grid columns − ...
Read MoreAdd rounded borders to first and last link in the pagination using CSS
To add rounded borders to the first and last links in pagination, use the border-radius property along with CSS pseudo-selectors :first-child and :last-child. For the left side, use border-top-left-radius and border-bottom-left-radius properties. For the right side, use border-top-right-radius and border-bottom-right-radius properties. Syntax /* Round left corners of first link */ .pagination a:first-child { border-top-left-radius: value; border-bottom-left-radius: value; } /* Round right corners of last link */ .pagination a:last-child { border-top-right-radius: value; border-bottom-right-radius: value; } Example The following ...
Read MoreMaximum difference between two elements such that larger element appears after the smaller number in C
We are given an array of integers of size N. The task is to find the maximum difference between two elements such that the larger element appears after the smaller number. That is, Arr[j] − Arr[i] is maximum such that j > i. Input: Arr[] = {2, 1, 3, 8, 3, 19, 21} Output: The maximum difference is 20 Explanation: The maximum difference is between 21 and 1, and 21 appears after 1 in the array. Syntax int maxDifference(int arr[], int n); Approach The optimal approach uses a single ...
Read MoreAdd hoverable pagination with CSS
Pagination is used to separate content into multiple pages with navigation numbers. This makes it easier to browse through large amounts of content by dividing entries into manageable sections. Hoverable pagination enhances user experience by providing visual feedback when users hover over page numbers. Syntax .pagination a { display: inline-block; padding: value; text-decoration: none; } .pagination a:hover { background-color: color; } .pagination a.active { background-color: color; } Key CSS Properties for Pagination ...
Read MoreMaximum difference between two subsets of m elements in C
The task is to find the maximum difference between the sum of two subsets, each containing m elements from an array. We need to find the subset with the highest sum and the subset with the lowest sum, then calculate their difference. Syntax int find_diff(int arr[], int length, int m); Algorithm The approach to solve this problem is − Sort the array in ascending order Sum the first m elements (lowest subset) Sum the last m elements (highest subset) Return the difference between highest and lowest sums Example 1: Basic ...
Read MoreMaximum difference of sum of elements in two rows in a matrix in C
We are given a matrix and the task is to find the greatest difference between the sum of elements in two rows of a matrix. Suppose we have a matrix M[i,j] with i rows and j columns. Let the rows be R0 to Ri-1. The difference will be calculated by subtracting the (sum of elements of Ry) - (sum of elements of Rx), where x
Read More