Ankith Reddy has Published 1210 Articles

What would happen if there were no Moon?

Ankith Reddy

Ankith Reddy

Updated on 27-Apr-2022 05:25:47

We cannot imagine our night sky without the bright moon. It adds the whole lot of beauty to the nights and has been the main subject for romantic poets for ages.Coming to the science, without the Moon, Earth will not have the steady tilt and scientists say that life on ... Read More

C++ equivalent of instanceof

Ankith Reddy

Ankith Reddy

Updated on 16-Feb-2022 07:41:26

C++ has no direct method to check one object is an instance of some class type or not. In Java, we can get this kind of facility.In C++11, we can find one item called is_base_of. This will check if the given class is a base of the given object or ... Read More

Reset all properties with CSS

Ankith Reddy

Ankith Reddy

Updated on 06-Jul-2020 11:28:34

Use the all property to reset all the properties. Set all property to initial, inherit or unset.ExampleYou can try to run the following code to implement the CSS all propertyLive Demo                    html {             color: blue;          }          #demo {             background-color: yellow;             color: red;             all: inherit;          }                     CSS all property       This is demo text.    

Avoid wrapping flex items with CSS

Ankith Reddy

Ankith Reddy

Updated on 04-Jul-2020 08:12:05

Use the flex-wrap property with nowrap value to avoid flex-items to wrap.ExampleYou can try to run the following code to implement the nowrap value −Live Demo                    .mycontainer {             display: flex;         ... Read More

CSS flex-grow property

Ankith Reddy

Ankith Reddy

Updated on 03-Jul-2020 10:37:27

Increase the size of a flex item, using the flex-grow property. Use it with one or more than flex items.ExampleYou can try to run the following code to implement the flex-grow property. Here Q3 flex-item is larger than other items −Live Demo             ... Read More

Usage of CSS align-content property flex-end value

Ankith Reddy

Ankith Reddy

Updated on 03-Jul-2020 07:52:11

Use the align-content property with value flex-end to set the flex lines in the end.ExampleYou can try to run the following code to implement the flex-end value.Live Demo                    .mycontainer {             display: flex;       ... Read More

How an or

Ankith Reddy

Ankith Reddy

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

Use the object-fit property in CSS to resize image or video to fit its container.ExampleYou can try to run the following code to achieve this.Live Demo                    .myimg {             width:250px;             height:350px;             object-fit:fill;          }                     SWIFT          

Build Horizontal Navigation Bar with Floating List Items in CSS

Ankith Reddy

Ankith Reddy

Updated on 01-Jul-2020 11:05:06

To create a horizontal navigation bar, use the floating list item.ExampleYou can try to run the following code to create a horizontal navigation barLive Demo                    ul {             list-style-type: none;             margin: 0;             padding: 0;          }          li {             float: left;          }          li a {             display: block;             padding: 8px;             background-color: orange;          }                              Home          News          Contact          About          

Set Font Size with em using CSS

Ankith Reddy

Ankith Reddy

Updated on 01-Jul-2020 11:03:26

To set font size with pixels, use the em unit, with the font-size property.1em = 16pxExampleYou can try to run the following code to set font size with emLive Demo                    h1 {             /* 30px/16 = 1.875em */             font-size: 1.875em;          }                     This is demo heading       This is demo text.    

Create a transparent box with CSS

Ankith Reddy

Ankith Reddy

Updated on 01-Jul-2020 10:51:39

To create a transparent box with CSS, you can try to run the following codeExampleLive Demo                    div {             background-color: #808000;             padding: 20px;          }          div.myopacity {             opacity: 0.4;             filter: alpha(opacity=80);          }                     Heading       Check trensparency in the below box:                opacity 0.4                      opacity 1          

1 2 3 4 5 ... 121 Next
Advertisements