Arjun Thakur has Published 1109 Articles

CSS object-fit Property Values

Arjun Thakur

Arjun Thakur

Updated on 03-Jul-2020 07:37:12

81 Views

The object-fit property in CSS is used to resize image or video to fit its container. It has the following valuescontain: Content is scaled to fitcover: clipped to fitfill: fills the content box.ExampleYou can try to run the following code to implement object-fit property with the cover value.Live Demo   ... Read More

Role of CSS :target Selector

Arjun Thakur

Arjun Thakur

Updated on 01-Jul-2020 09:19:09

172 Views

Use the CSS :target selector to highlight active HTML anchor with CSS.ExampleYou can try to run the following code to implement the :target SelectorLive Demo                    :target {             border: 2px solid #D4D4D4;     ... Read More

CSS position: sticky;

Arjun Thakur

Arjun Thakur

Updated on 01-Jul-2020 09:17:53

419 Views

The position: sticky; property allows you to position an element based on scroll position. Set an element as sticky on the top when a user scrolls down.ExampleYou can try to run the following code to implement CSS position: sticky;Live Demo                 ... Read More

Role of CSS :only-child Selector

Arjun Thakur

Arjun Thakur

Updated on 01-Jul-2020 08:59:40

92 Views

Use the CSS :only-child selector to style every element that is the only child of its parent.ExampleYou can try to run the following code to implement the :only-child selectorLive Demo                    p:only-child {             ... Read More

Generation of .HEX file using a linker

Arjun Thakur

Arjun Thakur

Updated on 30-Jun-2020 13:39:31

390 Views

The file MULT.ASM which is created by using an editor is simply a text file. We cannot execute this file directly. At first we have to assemble the file, and then we have to link it. The step of assembly the translation of the program of assembly language to machine ... Read More

MySQL: What is 'AUTO_INCREMENT=5' in a create table query?

Arjun Thakur

Arjun Thakur

Updated on 30-Jun-2020 13:13:09

690 Views

The AUTO_INCREMENT=5 in a create table query tells that the first record will start from 5 i.e. not default 1. As we know if you do not set the value to AUTO_INCREMENT then MySQL starts from 1 by default.The syntax is as follows:CREATE TABLE yourTableName ( yourColumnName1 dataType NOT NULL ... Read More

How do you append a carriage return to a value in MySQL?

Arjun Thakur

Arjun Thakur

Updated on 30-Jun-2020 12:30:09

933 Views

You need to use CONCAT_WS() function from MySQL to append a carriage return. If you are looking for a new line, then append in the beginning. The syntax is as follows −SELECT CONCAT_WS(‘’, yourColumnName) as anyVariableName from yourTableName;To understand the above syntax, let us create a table. The query ... Read More

Style every element that is the second child of its parent with CSS

Arjun Thakur

Arjun Thakur

Updated on 30-Jun-2020 11:22:25

670 Views

To style every element that is the second child of its parent with CSS, use the CSS :nth-child(n) selector.ExampleYou can try to run the following code to implement the :nth-child(n) selectorLive Demo                    p:nth-child(4) {         ... Read More

Role of CSS :invalid Selector

Arjun Thakur

Arjun Thakur

Updated on 30-Jun-2020 11:12:44

142 Views

Use the CSS :invalid selector to style all elements with an invalid value. You can try to run the following code to implement the :invalid selectorExampleLive Demo                    input:invalid {             background: red;          }                     Heading                    The style (red color background) appears if you type an irrelevant/ invalid email address.    

Style every enabled element with CSS

Arjun Thakur

Arjun Thakur

Updated on 30-Jun-2020 09:46:17

113 Views

To style every enabled element, use the CSS :enabled selector.ExampleYou can try to run the following code to style enabled elementLive Demo                    input:enabled {             background: blue;          }                              Subject          Student:          Age:          

Previous 1 ... 3 4 5 6 7 ... 111 Next
Advertisements