Found 1566 Articles for CSS

Role of CSS :checked Selector

radhakrishna
Updated on 22-Jun-2020 14:47:45

163 Views

Use the CSS :checked selector to style every checked element. You can try to run the following code to implement the :checked selector:ExampleLive Demo                    input:checked {             height: 20px;             width: 20px;          }                     Fav sports:                Football          Cricket           Tennis          Tennis           Output

Style the active link with CSS

Ankith Reddy
Updated on 30-Jun-2020 09:43:02

737 Views

To style the active links, use the CSS :active selector. You can try to run the following code to style the active linksExampleLive Demo                    a:active {             background-color: green;          }                     Welcome to Qries       Click on the above link to see the effect.    

Role of CSS :active Selector

usharani
Updated on 30-Jun-2020 09:44:49

192 Views

Use the CSS :active selector to style the active links. You can try to run the following code to implement the :active selector −ExampleLive Demo                    a:active {             background-color: orange;          }                     Welcome to Qries       Click on the above link to see the effect.    

Usage of CSS :focus pseudo-class

Arjun Thakur
Updated on 22-Jun-2020 14:38:04

87 Views

You can try to run the following code to implement :focus pseudo-classExampleLive Demo                    input:focus {             background-color: orange;          }                              Subject          Student:          Age:                     Output

What is a CSS Selector?

mkotla
Updated on 30-Jun-2020 09:45:26

597 Views

The selectors in CSS are patterns to select the element to style.Let us see the key selectors in CSS −SelectorDemoDescription class.demoSelects all elements with class="demo"#id#myidSelects the element with id="myid"**Used to select all the elements

CSS Descendant Selector

varun
Updated on 22-Jun-2020 10:58:36

228 Views

The descendant selector in CSS is used to match all elements that are descendants of a specified element.ExampleYou can try to run the following code to implement CSS Descendent Selector:Live Demo                    div p {             background-color: orange;          }                              Para 1 in the div          Para 2 in the div             Para 3 outside the div.     Output

CSS Child Selector

Chandu yadav
Updated on 30-Jun-2020 09:31:25

290 Views

Use the child selector, if you want to select all elements immediate children of a specified element.div > pExampleYou can try to run the following code to implement CSS Child SelectorLive Demo                    div > p {             background-color: orange;          }                              Para 1 in the div.                    Para 2 in the div.             Para 3 outside the div.     Output

Align elements using the CSS float property

varma
Updated on 22-Jun-2020 10:34:45

111 Views

To align elements using the float property in CSS, you can try to run the following code −ExampleLive Demo                    .demo {             float: right;             width: 200px;             border: 1px dashed blue;             padding: 5px;          }                     Heading                This is demo text and right aligned.           Output

CSS overflow-x

Chandu yadav
Updated on 30-Jun-2020 09:30:42

222 Views

The CSS overflow-x allows you to decide what to do with the left right edges of the content.ExampleYou can try to run the following code to implement the overflow-x propertyLive Demo                    div {             background-color: orange;             width: 250px;             height: 45px;             border: 2px solid blue;             overflow-x: hidden;             overflow-y: scroll;          }                     Heading       Overflow property used here. This is a demo text to show the working of CSS overflow-x and overflow-y.     Output

CSS overflow-y

Prabhas
Updated on 22-Jun-2020 09:33:36

167 Views

The CSS overflow-y allows you to decide what to do with the top bottom edges of the content. You can try to run the following code to implement the overflow-y property −ExampleLive Demo                    div {             background-color: orange;             width: 250px;             height: 45px;             border: 2px solid blue;             overflow-x: hidden;             overflow-y: scroll;          }                     Heading       Overflow property used here. This is a demo text to show the working of CSS overflow-x and overflow-y.     Output

Advertisements