CSS Articles

Page 124 of 130

How to change the color of focused links with CSS

karthikeya Boyini
karthikeya Boyini
Updated on 05-Mar-2020 1K+ Views

Use the :focus class to change the color of focused links. Possible values could be any color name in any valid format.ExampleYou can try to run the following code to implement the color of the focused link −                    a:focus {             color: #0000FF          }                     This is demo link    

Read More

Usage of :first-child pseudo-class in CSS

karthikeya Boyini
karthikeya Boyini
Updated on 04-Mar-2020 70 Views

Use the :first-child pseudo class to add special style to an element that is the first child of some other element.ExampleYou can try to run the following code to understand the usage of :first-child pseudo class −                    div > p:first-child          {             text-indent: 25px;          }                              First paragraph in div. This paragraph will be indented          Second paragraph in div. This paragraph will not be indented                But it will not match the paragraph in this HTML:                Heading          The first paragraph inside the div. This paragraph will not be effected.          

Read More

Usage of :hover pseudo-class in CSS

Ankith Reddy
Ankith Reddy
Updated on 04-Mar-2020 121 Views

The :hover pseudo class is used to add special style to an element when you mouse over it. Possible values could be any color name in any valid format.Example                    a:hover {             color: #FFCC00          }                     Bring Mouse Here    

Read More

Usage of margin property with CSS

George John
George John
Updated on 04-Mar-2020 95 Views

The margin property defines the space around an HTML element. It is possible to use negative values to overlap content. It specifies a shorthand property for setting the margin properties in one declaration.ExampleYou can try to run the following code to set margins −                            All four margins will be 20px                      Top margin will be 15px, left and right margin will be 4% of the total width of the document, bottom margin will be -10px          

Read More

Usage of :visited pseudo-class in CSS

karthikeya Boyini
karthikeya Boyini
Updated on 04-Mar-2020 73 Views

The :visited pseudo-class is used to add special style to a visited link. Possible values could be any color name in any valid format. Example                    a:visited {             color: #006600          }                     Click this link    

Read More

CSS outline-color property

Arjun Thakur
Arjun Thakur
Updated on 04-Mar-2020 112 Views

The outline-color property allows you to specify the color of the outline. Its value should either be a color name, a hex color, or an RGB value, as with the color and border-color properties.ExampleYou can try to run the following code to implement outline-color property −                            This text is having thin solid blue outline.                

Read More

CSS outline-style property

Samual Sam
Samual Sam
Updated on 04-Mar-2020 308 Views

The outline-style property specifies the style for the line that goes around an element. It can take one of the following values −none − No border. (Equivalent of outline-width:0;)solid − Outline is a single solid line.dotted − Outline is a series of dots.dashed − Outline is a series of short lines.double − Outline is two solid lines.groove − Outline looks as though it is carved into the page.ridge − Outline looks the opposite of groove.inset − Outline makes the box look like it is embedded in the page.outset − Outline makes the box look like it is coming out of the ...

Read More

Usage of :link pseudo-class in CSS

Chandu yadav
Chandu yadav
Updated on 04-Mar-2020 97 Views

The :link pseudo-class is used to add special style to an unvisited link. Possible values could be any color name in any valid format. Example                    a:link { color:#000000; }                                Demo Link          

Read More

What are CSS pseudo-classes

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 04-Mar-2020 102 Views

CSS pseudo-classes are used to add special effects to some selectors. You do not need to use JavaScript or any other script to use those effects.The most commonly used pseudo-classes are −ValueDescription:linkUse this class to add special style to an unvisited link.:visitedUse this class to add special style to a visited link.:hoverUse this class to add special style to an element when you mouse over it.:activeUse this class to add special style to an active element.:focusUse this class to add special style to an element while the element has focus.:first-childUse this class to add special style to an element that ...

Read More

Using CSS z-index property

karthikeya Boyini
karthikeya Boyini
Updated on 04-Mar-2020 186 Views

The z-index property is used along with the position property to create an effect of layers. You can specify which element should come on top and which element should come at the bottom. ExampleYou can try to run the following code to implement the z-index property −                                                     

Read More
Showing 1231–1240 of 1,299 articles
« Prev 1 122 123 124 125 126 130 Next »
Advertisements