
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 10483 Articles for Web Development

155 Views
Use the CSS :last-child selector to style every element that is the last child of its parent.ExampleYou can try to run the following code to implement the :last-child selector −Live Demo p:last-of-type { background: orange; } Heading This is demo text1. This is demo text2. This is demo text3.

102 Views
Use the CSS :lang selector to style every element with a lang attribute value with CSS. You can try to run the following code to implement the :lang selectorExampleLive Demo p:lang(fr) { background: greeb; } This is my country C'est mon pays French is the language of France

163 Views
Use the CSS :lang selector to style every element with a lang attribute value. You can try to run the following code to implement the :lang selector:ExampleLive Demo p:lang(fr) { background: green; } This is my country C'est mon pays French is the language of France

198 Views
To style all elements with an invalid value, use the CSS :invalid selector.ExampleYou can try to run the following code to implement the :invalid selector −Live Demo input:invalid { background: red; } Heading The style (red color background) appears if you type an irrelevant/ invalid email address.

230 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.

130 Views
Use the CSS :in-range selector to style elements with a value within a specified range. You can try to run the following code to implement the :in-range selector −ExampleLive Demo input:in-range { border: 3px dashed orange; background: yellow; } The style only works for the value entered i.e. 9

268 Views
To style links on mouse over with CSS, use the CSS: hover selector. You can try to run the following code to implement the: hover, selector,ExampleLive Demo a:hover { background-color: orange; } Google Keep the mouse cursor on the above link and see the effect.

162 Views
Use the CSS :first-of-type selector to style every element that is the first element of its parent with CSS.ExampleYou can try to run the following code to implement the :first-of-type selectorLive Demo p:first-of-type { background: orange; } This is demo text1. This is demo text2.

197 Views
Use the CSS :first-child selector to style every elements that is the first child of its parent.ExampleYou can try to run the following code to implement the :first-child selectorLive Demo p:first-child { background-color: orange; } Heading This is demo text. This is demo text, with the first child of its parent div. This is demo text, but not the first child.

261 Views
The position: absolute; property allows you to position element relative to the nearest positioned ancestor.ExampleYou can try to run the following code to implement CSS position: absolute;Live Demo div.one { position: relative; width: 500px; height: 150px; border: 2px solid blue; } div.two { position: absolute; top: 70px; right: 0; width: 300px; height: 50px; border: 2px solid yellow; } position: absolute; The position: absolute; property allows you to position element relative to the nearest positioned ancestor. div has position: relative; div has position: absolute;