CSS 3 Interview Questions and Answers (122) - Page 5

What do we mean by Cell Spacing?

NOTE: This is objective type question, Please click question title for correct answer.
What's the difference between a cell-spacing and a cell-padding?

Although both is used for formatting purposes but there is a major difference between cell-padding and cell-spacing.A cell padding is used to set extra space which is used to separate cell walls from their contents.
Whereas a cell spacing is used to set space between cells.

For Example:-
<table width = "100%" border = "1" cellspacing = "5">


We can also apply both cell-spacing and cell-padding together as:-

<table width = "100%" border = "1" cellpadding = "5" cellspacing = "5">

What's the difference between width:auto; and width:100%;

width: auto stretches to the full width and subtracts margins,padding,or borders from the available space inside.
Whereas width: 100% forces the element to become as wide as the parent and will add additional spacing to the width of the element.This typically causes problems.
Which Statement(s) is correct about scroll bar in CSS?

NOTE: This is objective type question, Please click question title for correct answer.
Which syntax is correct for changing the font of a control?

NOTE: This is objective type question, Please click question title for correct answer.
Which syntax is correct to make the text bold?

NOTE: This is objective type question, Please click question title for correct answer.
How to define an internal style sheet?

NOTE: This is objective type question, Please click question title for correct answer.
Which HTML attribute is used for defining an inline styles on controls?

NOTE: This is objective type question, Please click question title for correct answer.
Which character is used to separate the inline style property?

NOTE: This is objective type question, Please click question title for correct answer.
Which option is used to display the hyperlinks without an underline?

NOTE: This is objective type question, Please click question title for correct answer.
How to again apply an underline from anchor tag which was previously removed?

Just remove text-decoration:none css property from CSS class which is applied to any hyperlinks or anchor tags.So that,underline will again be applied to hyperlinks.
Which CSS property is correctly used to apply the size on controls?

NOTE: This is objective type question, Please click question title for correct answer.
How to Hide any controls completely from a Page definition?

Suppose,we want to hide Division control(div tag) from Page itself,then we have to write a CSS class for Div.
Here,we have to give position as absolute and top and left position as -9999px as shown below:-
#div_project

{
position: absolute;
top: -9999px;
left: -9999px;
}

Here,#div_project is my division tag.By above CSS,we can hide any controls.
How to design a Rounded Button for all the Browsers?

We have to write below CSS for having Rounded Buttons:-
.button_rounded

{
-moz-border-radius:4em;
-webkit-border-radius:4em;
border-radius:4em;
}


And apply above CSS class in any Buttons like:-
<asp:Button ID="Button1" runat="server" Text="Button"

CssClass ="button_rounded" />

How to keep Page Footer fixed for any layout?

Write below CSS code:-
#div_footer 

{
position:absolute;
bottom:0;
width:100%;
height:45px;
background:yellow;
}

Where #div_footer is my div id.
Which property is used to set any color of a control?

NOTE: This is objective type question, Please click question title for correct answer.
How to completely Remove a control from the Page?

We can write below CSS code:-
#div_project_details

{
position: absolute;
top: -9999px;
left: -9999px;
}
</style>

<div id="div_project_details" style="width:100%;height:400px;border-color:orange;">
<asp:TextBox ID="txt_project_name" runat="server"></asp:TextBox>
<asp:TextBox ID="txt_budget" runat="server"></asp:TextBox>
<asp:TextBox ID="txt_project_start_date" runat="server"></asp:TextBox>
<asp:TextBox ID="txt_project_end_date" runat="server"></asp:TextBox>
</div>

Which place is used to code if we want to change the whole page background at loading?

NOTE: This is objective type question, Please click question title for correct answer.
How to remove under-lines on all links on page or all anchor tags?

We have to write below CSS class:-
<style type = "text/css">

a
{
text-decoration:none;
}
</style>

How to underline link or change other styles when mouse is passed on it?

<style type = "text/css">

.class1 A:hover
{
text-decoration: underline overline;
color: #lightblue;
}
</style>

Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Interview Questions and Answers Categories