Without Book Interview Questions and Answers | Online Test | Moct Test
Download Android App in your Android Device from Google Play Store
- Search for "Withoutbook Practice Exam Test" in Mobile/Tablet Play Store
Institute Training Search by Name or Email

Exams Attended

Make Homepage

Bookmark this page

Subscribe Email Address

CSS Interview Questions and Answers

Ques 61. What can be done with style sheets that can not be accomplished with regular HTML?

Ans. Many of the recent extensions to HTML have been tentative and somewhat crude attempts to control document layout. Style sheets go several steps beyond, and introduces complex border, margin and spacing control to most HTML elements. It also extends the capabilities introduced by most of the existing HTML browser extensions. Background colors or images can now be assigned to ANY HTML element instead of just the BODY element and borders can now be applied to any element instead of just to tables. For more information on the possible properties in CSS, see the Index DOT Css Property Index.

Is it helpful? Add Comment View Comments
Ques 62. How do I make my div 100% height?
Ans. You need to know what the 100% is of, so the parent div must have a height set. One problem that people often come up against is making the main page fill the screen if there\'s little content. You can do that like this :
CSS
body, html {
height:100%;
}
body {
margin:0;
padding:0;
}
#wrap {
position:relative;
min-height:100%;
}
* html #wrap {
height:100%;
}

Here, the #wrap div goes around your whole page - it\'s like a sub-body.

You need to use \'min-height\' rather than \'height\' for Firefox because otherwise it will set it to 100% of the viewport and no more. Internet Explorer, being well... crap, treats \'height\' as it should be treating \'min-height\' which it doesn\'t recognise. (You can target IE by preceding your code with \' * html \').

To make floated divs within this #wrap div 100% of the #wrap div... well that\'s more difficult. I think the best way is to use the \'faux columns\' technique which basically means that you put the background in your body rather than your columns. If the body has columns and your floats don\'t then it looks like your floated content is in a column that stretches to the bottom of the page. I\'ve used this technique in my layout demos.

The problem is often not that the columns aren\'t 100% height, but that they\'re not equal lengths. Columns usually don\'t start from the top of the page and end at the bottom - there\'s often a header and a footer or sometimes, more interesting designs don\'t have a recognisable columnar layout, but do require div boxes to be equal heights. This can be done with the aid of a couple of images and some css or with some javascript.
Is it helpful? Add Comment View Comments
Ques 63. What is property?
Ans. Property is a stylistic parameter (attribute) that can be influenced through CSS, e.g. FONT or WIDTH. There must always be a corresponing value or values set to each property, e.g. font: bold or font: bold san-serif.
Is it helpful? Add Comment View Comments
Ques 64. How do I write my style sheet so that it gracefully cascades with user's personal sheet ?
Ans.
You can help with this by setting properties in recommended places. Style rules that apply to the whole document should be set in the BODY element -- and only there. In this way, the user can easily modify document-wide style settings.
Is it helpful? Add Comment View Comments
Ques 65. What are pseudo-elements?
Ans. Pseudo-elements are fictional elements that do not exist in HTML. They address the element\\\'s sub-part (non-existent in HTML) and not the element itself. In CSS1 there are two pseudo-elements: \\\'first-line pseudo-element\\\' and \\\'first-letter pseudo-element\\\'. They can be attached to block-level elements (e.g. paragraphs or headings) to allow typographical styling of their sub-parts. Pseudo-element is created by a colon followed by pseudo-element\\\'s name, e.g:

P:first-line
H1:first-letter

and can be combined with normal classes; e.g:

P.initial:first-line

First-line pseudo-element allows sub-parting the element\\\'s first line and attaching specific style exclusively to this sub-part; e.g.:

P.initial:first-line {text-transform: uppercase}

<P class=initial>The first line of this paragraph will be displayed in uppercase letters</P>

First-letter pseudo-element allows sub-parting the element\\\'s first letter and attaching specific style exclusively to this sub-part; e.g.:

P.initial:first-letter { font-size: 200%; color: red}

<P class=initial>The first letter of this paragraph will be displayed in red and twice as large as the remaining letters</P>
Is it helpful? Add Comment View Comments

Most helpful rated by users:

©2016 WithoutBook