Wednesday 11 February 2015

CSS(Cascading Style Sheet) Interview Questions and answers

Below are some important CSS3 interview questions which are asked in most MNC company interviews for beginners or professionals.

16.What are the additional features which were present in CSS2 compared to CSS1?

Many of the new features were present in CSS2 some of them are as follows. 1) Positioning of elements will be according to the relative, fixed and the absolute positioning. 2) Inclusion of large number of media functions. 3) Shadows, bidirectional support for text and aural style sheets.

17.What are the main goals of applying style sheets?
The main use of style sheet is to give the user a greater degree of control over his presentation. If the user does not like a certain font he can change it with flexibility without any difficulty. Also a developer can minimize the effects which a browser can have on the application or the text part of the webpage. Control over the entire web page without any external influences, separation of the page from the HTML code part.

18. What is wrapping in CSS3?
Wrapping is a vital property for proper display of contents in web pages. If wrapping is disabled then the user could not display and view long lines that goes outside the window boundary and thus becomes useless.

19. What is the syntax of Opacity in CSS3?
style="opacity:0.4;filter:alpha(opacity=40)"
Firefox uses the property opacity:x for transparency, while IE uses
filter:alpha (opacity=x).

20. How do you manage the complete site in center of the browser, which is completely using divs using the help of css2 or css3?
In CSS file
1. body{width:100%;}
2. Create a div tag and assign a class, say 'container' and place all your content in this div tag.
3. Assign properties to this class in CSS file
    container{width:777px; margin:auto;}
Note: "margin:auto" will place your page in center of the page.
More Questions & Answers :-

No comments:

Post a Comment