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 by Smita Kapse
Page 4 of 39
Set how many columns an element should span across with CSS
The CSS column-span property allows an element to span across multiple columns in a multi-column layout. This is particularly useful for creating headings or other elements that should break the column flow. Syntax selector { column-span: value; } Possible Values ValueDescription noneThe element does not span across columns (default) allThe element spans across all columns Example: Heading Spanning All Columns The following example demonstrates how to make a heading span across all columns in a multi-column layout − ...
Read MoreRole of CSS flex-wrap property wrap-reverse value
The CSS flex-wrap property with wrap-reverse value allows flex items to wrap to new lines in reverse order. When flex items exceed the container width, they wrap from bottom to top instead of the default top to bottom behavior. Syntax .container { display: flex; flex-wrap: wrap-reverse; } Example The following example demonstrates how wrap-reverse wraps flex items in reverse order − .mycontainer { display: flex; ...
Read MoreCreate white text with black shadow using CSS
The CSS text-shadow property is used to create a shadow effect behind text. To create white text with a black shadow, you need to set the text color to white and define the shadow parameters including color, offset, and blur radius. Syntax selector { text-shadow: horizontal-offset vertical-offset blur-radius color; } Example The following example creates white text with a black shadow using the text-shadow property − body { background-color: #f0f0f0; ...
Read MoreStyle Input Fields of a form with CSS
CSS provides powerful styling capabilities for form input fields, allowing you to customize their appearance, layout, and user interaction states. You can control properties like width, padding, borders, colors, and focus effects to create attractive and user-friendly forms. Syntax input[type="text"] { property: value; } input { property: value; } Example: Basic Input Field Styling The following example demonstrates how to style input fields with width, padding, and borders − input[type="text"] { ...
Read MoreLight Speed In Animation Effect with CSS
The CSS light speed in animation effect creates a dramatic entrance where an element appears to speed in from the right side of the screen with a skewing motion that simulates high-speed movement. Syntax @keyframes lightSpeedIn { 0% { transform: translateX(100%) skewX(-30deg); opacity: 0; } 100% { transform: translateX(0%) skewX(0deg); opacity: 1; ...
Read MoreHow to use use an array of pointers (Jagged) in C/C++?
In C programming, an array of pointers (also known as jagged arrays) allows you to store multiple pointers in a single array. This is particularly useful when working with strings of different lengths or when you need to point to different memory locations dynamically. Syntax data_type *array_name[size]; Where data_type is the type of data the pointers will point to, and size is the number of pointers the array can hold. Example 1: Array of Integer Pointers The following example demonstrates how to create an array of pointers that point to integer values − ...
Read MoreWhat does it mean when a numeric constant in C/C++ is prefixed with a 0?
When a numeric constant in C is prefixed with a 0, it indicates that the number is an octal number (base 8). Octal literals must start with 0 to distinguish them from decimal numbers. For example, the octal number 25 is written as 025 in C. Syntax 0octal_digits Where octal_digits are valid octal digits (0-7). Example: Octal Number Conversion The following program demonstrates how octal literals are converted to decimal values − #include int main() { int a = 025; /* Octal ...
Read MoreWhy strict aliasing is required in C?
Strict aliasing is a critical concept in C that helps prevent undefined behavior when accessing the same memory location through pointers of different types. Understanding why it's required helps write safer and more predictable C code. What is Strict Aliasing? Strict aliasing is a rule that states an object can only be accessed through pointers of compatible types. When this rule is violated, the behavior becomes undefined, leading to unpredictable results. Example: Strict Aliasing Violation Here's an example demonstrating what happens when strict aliasing rules are violated − #include int temp = ...
Read MoreWhat is data type of FILE in C?
In C, FILE is a special data type used to handle file operations. FILE is what we call an "opaque data type" − its internal implementation is hidden from the programmer and is system-specific. When we work with files, we use pointers of type FILE to access and manipulate file data. Syntax FILE *file_pointer; What Makes FILE an Opaque Data Type? The FILE structure contains internal fields that manage file operations like buffering, positioning, and error states. The actual definition varies between different operating systems and C library implementations. FILE Structure Definition (System-Specific) ...
Read MoreIncompatibilities between C and C++
Here we will see some incompatibilities between C and C++. Some C codes that can be compiled using C compiler, but does not compile in C++ compiler and returns errors. Syntax // C allows various syntaxes that C++ rejects // Old-style function declarations, implicit int, multiple declarations, etc. Example 1: Old-Style Function Declarations C allows defining functions with parameter types specified after the parameter list − #include void my_function(x, y) int x; int y; { printf("x = %d, y = %d", x, y); } ...
Read More