Wednesday, September 9, 2009
CSS Display Block
CSS stands for Cascading Style Sheet. Style defines how to display HTML document.
External style sheet can save a lot of work. These style sheets are saved in CSS file.
With CSS we can create good looking websites with great effect. It can control the text, and layout of a website in single file.
CSS classification property specifies how to display an element, and the visibility of the element.
Hiding of an element can be done by setting the display property to “none” or the visibility property to “hidden”.
For example: h1.hidden {visibility: hidden}
A block element is a one that takes up the full width available and has a line break before and after it.
Changing the display type of an element changes only how the element is to be displayed.
Visibility and Display are the two properties of cascading style sheet (CSS).
The properties of both seems to be the same. But, infect are quite different. If the visibility is set to be hidden, the element being hidden still occupies the same place in the layout of the page. web users expect web pages to be more interactive. To this end, the ability to change page layouts provides your users with a more immersive experience and allows them to consume information more easily, either with a quick gallery view, or a detailed summary view
Changing an inline element to a block element, or vice versa, can be useful for making the page look a specific way, and still follow web standards.
There are three ways of inserting style sheets,
1. External Style Sheet
2. Internal Style Sheet
3. Inline Style Sheet
External Style Sheet
An external style sheet is ideal when the style is applied to many pages. With an external style sheet, you can change the look of an entire Web site by changing one file.
An external style sheet can be written in any text editor.The file should not contain any HTML tags.
Internal Style Sheet
An internal style sheet is ideal when a single document has a unique style. You define internal styles in the head section of an HTML page, by using the