Archive for CSS2 technical questions

You are browsing the archives of CSS2 technical questions.

CSS2 interview questions(91-100)

Border around a table?
Try the following:
.tblboda {
border-width: 1px;
border-style: solid;
border-color: #CCCCCC;
}
/*color, thickness and style can be altered*/
You put this style declaration either in
an external stylesheet, or you can stuff it in
the

<head></head>

section, like:

<style type="text/css">
(here you can place your styles)
</style>
 
and apply it to the table as follows:
 
<div class="tblboda">
<table yaddayadda>
<tr>
<td>Content text and more content</td>
</tr>
</table>
</div>

That should give you a [...]

CSS2 interview questions(81-90)

What is shorthand property?
Shorthand property is a property made up of individual properties that have a common “addressee”. For example properties: font-weight, font-style, font-variant, font-size, font-family, refer to the font. To reduce the size of style sheets and also save some keystrokes as well as bandwidth they can all be specified as one shorthand [...]

CSS2 interview auusetiom(71-80)

Can I include comments in my Style Sheet?
Yes. Comments can be written anywhere where whitespace is allowed and are treated as white space themselves. Anything written between /* and */ is treated as a comment (white space). NOTE: Comments cannot be nested.

What is the difference between ID and CLASS?
ID identifies and sets style [...]

CSS2 interview questions(61-70)

How do I have a non-tiling (non-repeating) background image?
With CSS, you can use the background-repeat property. The background repeat can be included in the shorthand background property, as in this example:
body {
background: white url(example.gif) no-repeat ;
color: black ;
}
CSS
CSS is clearly very useful for separating style from content. But apparently people tend to have problems [...]

CSS2 interview questions(51-60)

How do I get rid of the gap under my image?
Images are inline elements, which means they are treated in the same way as text. Most people kind of know this - they know that if you use ‘text-align:center’ on an image it will be centred. What many people don’t realise is that this [...]

CSS2 interview questions(41-50)

Why call the subtended angle a “pixel”, instead of something else (e.g. “subangle”)?
In most cases, a CSS pixel will be equal to a device pixel. But, as you point out, the definition of a CSS pixel will sometimes be different. For example, on a laser printer, one CSS pixel can be equal to 3×3 [...]

CSS2 interview questions(31-40)

what CSS is, why not start coding?
CSS is sort of like scripting language made for the web. In contrary with HTML, DHTML, JavaScript, VBScript and many others. CSS is strictly for formatting your web-page and now many new browser support it. (NOTE: Older browser do not support CSS, so please check your browser version [...]

CSS2 interview questions(21-30)

Why do style sheets exist?
SGML (of which HTML is a derivative) was meant to be a device-independent method for conveying a document’s structural and semantic content (its meaning.) It was never meant to convey physical formatting information. HTML has crossed this line and now contains many elements and attributes which specify visual style and formatting [...]

CSS2 Interview QuestionS(11-20)

Three selectors: h1, .warning and #footer, what they do ?
An element points at a HTML-tag somewhere on your page. In the example above we want to style the

<h1>-tag.

Note that using an element like that affects all tags with that name, so using p { margin-left: 100px; } gives all

 
-tags

a left-margin.
Using a class is [...]

CSS2 Interview Questions(1-10)

What is CSS?
1. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. Every element type as well as every occurrence of a specific element within that type can be declared an unique style, e.g. margins, positioning, color or size.
2. CSS is a web standard that [...]