AmitDiwan has Published 11367 Articles

Styling Forms with CSS Attribute Selectors

AmitDiwan

AmitDiwan

Updated on 27-Dec-2023 16:47:26

281 Views

Apply styles to HTML elements with particular attributes using Attribute Selectors in CSS. Let us see which attribute selectors are available with the rules. The [attribute] Selector The [attribute] selector selects elements with a specified attribute. Here, the link with the attribute target is styled − a[target] { ... Read More

Styling First-Letters with CSS ::first-letter

AmitDiwan

AmitDiwan

Updated on 27-Dec-2023 16:45:42

1K+ Views

CSS can help us style the first letter of an element using the ::first-letter pseudo-element. Note that punctuation marks, digraphs and content property can change the first-letter. The following examples illustrate CSS ::first-letter pseudo-element. Style the first letter The first letter of all the elements, such as and ... Read More

Styling different states of a link using CSS

AmitDiwan

AmitDiwan

Updated on 27-Dec-2023 16:39:43

148 Views

Using CSS pseudo selectors, namely, :active, :hover, :link and :visited, we can style different states of a link. For proper functionality, the order of these selectors is given by:- :link, :visited, :hover, :active. Syntax The syntax of CSS text-indent property is as follows − a:(pseudo-selector) { ... Read More

Standard Link Styles in CSS

AmitDiwan

AmitDiwan

Updated on 27-Dec-2023 16:38:33

297 Views

We can style links as per our requirements. It is recommended that links have styles which distinguish them from normal text. The default link styles for different link states is as follows − Link State Color active #EE0000 focus #5E9ED6 or a similar shade ... Read More

Stacking Elements in Layers using z-index Property using CSS

AmitDiwan

AmitDiwan

Updated on 27-Dec-2023 16:36:33

206 Views

Using CSS Z-Index property developer can stack elements onto one another. Z-Index can have a positive or a negative value. NOTE − If elements that overlap do not have z-index specified then that element will show up that is mentioned last in document. The following are some examples to implement ... Read More

Specify Word Breaking Rules using CSS3

AmitDiwan

AmitDiwan

Updated on 27-Dec-2023 16:34:01

129 Views

To specify word breaking rules in CSS3, use the word-break property. This property is used to break the line. Let us see the syntax − word-break: value; The values include normal − The default line break rules. break-all − The word is broken at any character ... Read More

Some Lesser-Known CSS Properties for Form Input Fields

AmitDiwan

AmitDiwan

Updated on 27-Dec-2023 16:32:36

105 Views

CSS caret-color, pointer-events and tab-size are some of the lesser-known properties for form input fields. caret-color property allows us specify color of blinking caret while pointer-events can help prevent the users to find an element. Finally, tab-size sets the amount of white space used by tab. The following examples illustrate ... Read More

Smooth Scrolling with Pure CSS

AmitDiwan

AmitDiwan

Updated on 27-Dec-2023 16:31:01

306 Views

The CSS scroll-behavior property allows us to change the behavior of scroll. The following are the values are set within the scrolling box − auto − A scroll effect is set between the elements within the scrolling box. Smooth − A smooth animated scroll effect is set between the ... Read More

Setting the size of the radial gradients using CSS

AmitDiwan

AmitDiwan

Updated on 27-Dec-2023 16:29:59

889 Views

To set the size of the radial gradient, use the radial-gradient() function. This function sets a radial gradient as the background image. The second parameter in the function is to be set as the size you want as in the below example − background-image: radial-gradient(40% 50px at center, rgb(30, ... Read More

Setting the Location Color Stops using CSS

AmitDiwan

AmitDiwan

Updated on 27-Dec-2023 16:27:33

117 Views

To create linear gradient, use the linear-gradient() method of the background-image property. Syntax The following is the syntax − background-image: linear-gradient(angle, color-stop1, color-stop2); The location at color stops can be set as a percentage or absolute length. For example, for linear gradient. The color stops are the colors ... Read More

Previous 1 ... 5 6 7 8 9 ... 1137 Next
Advertisements