Lakshmi Srinivas has Published 315 Articles

Set the width, line style and color properties for an outline in a single statement with CSS

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 04-Mar-2020 11:26:25

114 Views

The outline property is a shorthand property that allows you to specify values for multiple properties such as width, line style, and color of the outline.Example                            This text is having thin solid freen outline.                            This text is having thick dashed green outline.                      

Specify the top padding of an element with CSS

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 04-Mar-2020 11:12:29

87 Views

The padding-top specifies the top padding of an element. It sets the top padding of an element. This can take a value in terms of length of %.Example                            This is demo content.                      This is another demo content.          

Usage of CSS list-style property

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 04-Mar-2020 11:04:31

78 Views

The list-style serves as shorthand for the preceding properties. The list-style allows you to specify all the list properties into a single expression.Example                            Table          Chair          

Example of embedded CSS

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 04-Mar-2020 10:31:30

5K+ Views

Place your CSS rules into an HTML document using the element that is called embedded CSS. This tag is placed inside ... tags. Rules defined using this syntax will be applied to all the elements available in the document.Following is the example of embed CSS based on the above ... Read More

How to make the main content div fill height of screen with CSS and HTML

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 04-Mar-2020 06:31:24

337 Views

The position property specifies the type of positioning method used for an element (static, relative, absolute, fixed, or sticky).In the below-given example, no height is specified in percentage and no jQuery is needed.mainbody{      position: absolute;//here we are setting the position of an element as absolute    top: 30px; ... Read More

Menu not visible in IE8. How to make it visible with HTML?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 04-Mar-2020 06:22:09

67 Views

One of the divs, when placed in another style sheet, can make menu invisible in Internet Explorer.If opacity property is used which is not a cross-border solution, it should be like the following to display −opaque {      -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; // first      filter: alpha(opacity=90);  // second }

What does the method equals(obj[] a1, obj[] a2) do in java?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 20-Feb-2020 12:46:45

128 Views

The equals(Object[] a, Object[] a2) method of the java.util.Arrays class returns true if the two specified arrays of objects are equal to one another. The two arrays are considered equal if both arrays contain the same number of elements, and all corresponding pairs of elements in the two arrays are equal. ... Read More

How to sort a String array in Java?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 19-Feb-2020 10:45:55

13K+ Views

To sort a String array in Java, you need to compare each element of the array to all the remaining elements, if the result is greater than 0, swap them.One solution to do so you need to use two loops (nested) where the inner loop starts with i+1 (where i ... Read More

What are vararg methods in Java?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 18-Feb-2020 10:02:14

162 Views

In Java methods, parameters accept arguments with three dots. These are known as variable arguments.sample(int args …){}If they are used you can pass a different number of arguments each time you call these methods.Examplepublic class Sample {    void demoMethod(String... args) {       for (String arg: args) { ... Read More

How do we call a Java method recursively?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 18-Feb-2020 09:55:44

166 Views

Recursion is where which a method class itself.Examplepublic class RecursionExample {    private static long factorial(int n) {    if (n == 1)       return 1;    else       return n * factorial(n-1);    }    public static void main(String args[]) {       RecursionExample obj = new RecursionExample();       long result = obj.factorial(5);       System.out.println(result);    } }

Advertisements