Arjun Thakur has Published 1247 Articles

Return the value of an attribute of the selected element using CSS

Arjun Thakur

Arjun Thakur

Updated on 04-Jul-2020 07:03:06

The attr() CSS function returns the value of an attribute of the selected element using CSSExampleYou can try to run the following code to implement the attr() function in CSSLive Demo                    a:before {content: " (" attr(href) ")";}                     Information Resource                Resource:Welcome to Qries          

CSS flex-flow Property

Arjun Thakur

Arjun Thakur

Updated on 04-Jul-2020 06:10:06

To set both the flex-direction and flex-wrap properties, use a single property flex-flowExampleYou can try to run the following code to implement the flex-flow property to set the direction and wrap property of flex −Live Demo                    .mycontainer {       ... Read More

Add borders to pagination using CSS

Arjun Thakur

Arjun Thakur

Updated on 03-Jul-2020 08:03:59

Use the border property to add border to pagination.ExampleYou can try to run the following code to set borders for paginationLive Demo                    .demo {             display: inline-block;          }     ... Read More

How to set android notification icon?

Arjun Thakur

Arjun Thakur

Updated on 03-Jul-2020 08:00:31

This example demonstrate about How to set android notification iconStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     Step 3 − Add ... Read More

How to specify the type of box used for an HTML element using CSS?

Arjun Thakur

Arjun Thakur

Updated on 03-Jul-2020 07:50:16

Use the display property to specify the type of box used for an HTML element.ExampleYou can try to run the following code to implement the display property to display flex container.Live Demo                    .mycontainer {           ... Read More

How to add a colored border to a button with CSS?

Arjun Thakur

Arjun Thakur

Updated on 03-Jul-2020 07:44:36

To add colored border, use the CSS border property.ExampleYou can try to run the following code to add a colored border.Live Demo                    .button {             background-color: yellow;             color: black;             text-align: center;             font-size: 15px;             padding: 20px;             border-radius: 15px;             border: 3px dashed blue;          }                     Result       Click below for result:       Result    

CSS object-fit Property Values

Arjun Thakur

Arjun Thakur

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

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

Build a Vertical Navigation Bar with CSS

Arjun Thakur

Arjun Thakur

Updated on 01-Jul-2020 10:52:37

To build a vertical navigation bar, you can try to run the following code.ExampleLive Demo                    ul {             list-style-type: none;             margin: 5;             padding: 5;          }          li a {             display: block;             width: 70px;             background-color: orange;          }                              Home          Company          Product          Services          Contact          

Role of CSS :target Selector

Arjun Thakur

Arjun Thakur

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

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

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

Advertisements