Web authors gain unprecedented control over the look of documents with Cascading Style Sheets (CSS). This section contains a list of articles that are available for CSS.
About Element Positioning
Windows Internet Explorer supports the ability to position HTML elements in x- and y-coordinates and to overlap elements in planes along the z-axis, which extends toward and away from the viewer in a Web document. These capabilities allow authors to precisely place elements, images, controls, or text on to a web page. By using scripts to manipulate the position coordinates and other dynamic styles, authors can move elements around a page, creating animated effects. The combination of dynamic styles, positioning, transparent Microsoft ActiveX Controls, and transparent images presents authors with a rich set of animation options.
About Window Restrictions
In Internet Explorer, scripts can open two different types of windows and can resize and reposition existing windows. Malicious coders have used these script-opened windows and the script-driven window positioning to mislead and deceive users. The Window Restrictions security feature in Microsoft Internet Explorer 6 for Microsoft Windows XP Service Pack 2 (SP2) now restricts the opening and placement of windows by script to prevent malicious coders from misleading users. These restrictions include constraints on new Internet Explorer windows created by the window.open method and HTML pop-up windows created by the window.createPopup method, and positioning and sizing of Internet Explorer windows. By understanding Window Restrictions and how they work, you can write your scripts so that your Web pages function as expected.
Color Table
Colors can be specified in HTML pages in two ways
Compatibility in Internet Explorer 5.5
This document describes the features in Internet Explorer 5.5 that may not be compatible with applications you developed for earlier versions of Internet Explorer.
Controlling Presentation with Measurement and Location Properties In Quirks Mode
Dynamic HTML (DHTML) exposes measurement and location properties that you can use to change the size and position of HTML elements on your Web pages. When you understand what these properties are and how they affect elements on a page, you can achieve greater control over the appearance of your Web pages. For example, you can use these properties to design pages that are similar to documents in other applications, such as Microsoft PowerPoint or Microsoft Word.
Controlling Presentation with Measurement and Location Properties In Strict Mode
DHTML exposes measurement and location properties that can be used to change the size and position of HTML elements on your web pages. An understanding of these properties and their impact on the elements in a page can help you achieve greater control over the layout of your websites. This article explains how you can use measurement and location properties to control the appearance of a web page that is rendered using the Internet Explorer 7 strict mode.
CSS Improvements in Internet Explorer 8
Internet Explorer 8 is the most CSS-compliant release yet. This topic is composed of a comprehensive list of the changes to CSS support in Internet Explorer 8 Beta 1.
CSS Length Units Reference
This section defines the supported length units for CSS
How to Fly Text in DHTML
This article demonstrates both ways to implement flying text through the marquee element and through CSS positioning.
How to Manipulate Text Effects in Response to Mouse Events
Some DHTML effects require minimal scripting to attain. One such effect, activating text in response to mouse events, is achieved largely through the use of CSS rules and the className property. Creating text effects in this manner yields ease of maintenance and succinct code.
Introduction to Dynamic Styles
You can dynamically change the style of any HTML element in a document. You can change colors, fonts, spacing, indentation, position, and even the visibility of text. Because the DHTML Document Object Model (DOM) makes every HTML element and attribute accessible, it is easy to use scripts to dynamically read and change styles.
Managing Style Sheets
Dynamically changing CSS styles that are applied to documents is not limited to the inline styles (styles defined on HTML elements with the STYLE attribute). Global style sheets defined with a LINK or STYLE tag in the HEAD section of the document can be manipulated through script. Manipulating the global style sheet is a powerful way to dynamically change the styles that apply to Web pages.
Measuring Element Dimension and Location
The following section is designed to help Web authors understand how to access the dimension and location of elements on the page through the DHTML Object Model.
Printing and Style Sheets
The style and link elements support the MEDIA attribute, which defines the output device for the style sheet.
Understanding CSS Selectors
The basic building blocks of a CSS style sheet are its style rules. Selectors are used to "select" elements on an HTML page so that they can be styled. Without selectors, there would be no way to determine how the rules should be applied. This article introduces the fundamentals of CSS declaration syntax, to describe how selectors are used.
accelerator
Sets or retrieves a string that indicates whether the object contains an accelerator key.
background
Sets or retrieves up to five separate background properties of the object.
backgroundAttachment
Sets or retrieves how the background image is attached to the object within the document.
backgroundColor
Sets or retrieves the color behind the content of the object.
backgroundImage
Sets or retrieves the background image of the object.
backgroundPosition
Sets or retrieves the position of the background of the object.
backgroundPositionX
Sets or retrieves the x-coordinate of the backgroundPosition property.
backgroundPositionY
Sets or retrieves the y-coordinate of the backgroundPosition property.
backgroundRepeat
Sets or retrieves how the backgroundImage property of the object is tiled.
behavior
Sets or retrieves the location of the DHTML behavior.
border
Sets or retrieves the properties to draw around the object.
borderBottom
Sets or retrieves the properties of the bottom border of the object.
borderBottomColor
Sets or retrieves the color of the bottom border of the object.
borderBottomStyle
Sets or retrieves the style of the bottom border of the object.
borderBottomWidth
Sets or retrieves the width of the bottom border of the object.
borderCollapse
Sets or retrieves a value that indicates whether the row and cell borders of a table are joined in a single border or detached as in standard HTML.
borderColor
Sets or retrieves the border color of the object.
borderLeft
Sets or retrieves the properties of the left border of the object.
borderLeftColor
Sets or retrieves the color of the left border of the object.
borderLeftStyle
Sets or retrieves the style of the left border of the object.
borderLeftWidth
Sets or retrieves the width of the left border of the object.
borderRight
Sets or retrieves the properties of the right border of the object.
borderRightColor
Sets or retrieves the color of the right border of the object.
borderRightStyle
Sets or retrieves the style of the right border of the object.
borderRightWidth
Sets or retrieves the width of the right border of the object.
borderSpacing
Sets or retrieves
the distance between the borders of adjoining cells in a table.
borderStyle
Sets or retrieves the style of the left, right, top, and bottom borders of the object.
borderTop
Sets or retrieves the properties of the top border of the object.
borderTopColor
Sets or retrieves the color of the top border of the object.
borderTopStyle
Sets or retrieves the style of the top border of the object.
borderTopWidth
Sets or retrieves the width of the top border of the object.
borderWidth
Sets or retrieves the width of the left, right, top, and bottom borders of the object.
bottom
Sets or retrieves the bottom position of the object in relation to the bottom of the next positioned object in the document hierarchy.
captionSide
Sets or retrieves
where the caption
of a table is located.
clear
Sets or retrieves whether the object allows floating objects on its left side, right side, or both, so that the next text displays past the floating objects.
clip
Sets or retrieves which part of a positioned object is visible.
clipLeft
Gets the left coordinate of the object clipping region.
clipRight
Gets the right coordinate of the object clipping region.
clipTop
Gets the top coordinate of the object clipping region.
color
Sets or retrieves the color of the text of the object.
content
Sets or retrieves
generated content to insert before or after an element.
cssText
Sets or retrieves the persisted representation of the style rule.
cursor
Sets or retrieves the type of cursor to display as the mouse pointer moves over the object.
direction
Sets or retrieves the reading order of the object.
display
Sets or retrieves whether the object is rendered.
filter
Sets or retrieves the filter or collection of filters applied to the object.
font
Sets or retrieves a combination of separate font properties of the object. Alternatively, sets or retrieves one or more of six user-preference fonts.
fontFamily
Sets or retrieves the name of the font used for text in the object.
fontSize
Sets or retrieves a value that indicates the font size used for text in the object.
fontStyle
Sets or retrieves the font style of the object as italic
, normal
, or oblique
.
fontVariant
Sets or retrieves whether the text of the object is in small capital letters.
fontWeight
Gets the numeric weight of the font of the object.
fontWeight
Sets or retrieves the weight of the font of the object.
hasLayout
Gets a value that indicates whether the object has layout.
height
Sets or retrieves the height of the object.
imeMode
Sets or retrieves the state of an Input Method Editor (IME).
layoutFlow
Sets or retrieves the direction and flow of the content in the object.
layoutGrid
Sets or retrieves the composite document grid properties that specify the layout of text characters.
layoutGridChar
Sets or retrieves the size of the character grid used for rendering the text content of an element.
layoutGridLine
Sets or retrieves the gridline value used for rendering the text content of an element.
layoutGridMode
Sets or retrieves whether the text layout grid uses two dimensions.
layoutGridType
Sets or retrieves the type of grid used for rendering the text content of an element.
left
Sets or retrieves the position of the object relative to the left edge of the next positioned object in the document hierarchy.
letterSpacing
Sets or retrieves the amount of additional space between letters in the object.
lineBreak
Sets or retrieves
line-breaking rules for text in selected languages
such as Japanese, Chinese and Korean.
lineHeight
Sets or retrieves the distance between lines in the object.
listStyle
Sets or retrieves up to three separate listStyle properties of the object.
listStyleImage
Sets or retrieves a value that indicates which image to use as a list-item marker for the object.
listStylePosition
Sets or retrieves a variable that indicates how the list-item marker is drawn relative to the content of the object.
listStyleType
Sets or retrieves the predefined type of the line-item marker for the object.
margin
Sets or retrieves the width of the top, right, bottom, and left margins of the object.
marginBottom
Sets or retrieves the height of the bottom margin of the object.
marginLeft
Sets or retrieves the width of the left margin of the object.
marginRight
Sets or retrieves the width of the right margin of the object.
marginTop
Sets or retrieves the height of the top margin of the object.
maxHeight
Sets or retrieves the maximum height for an element.
maxWidth
Sets or retrieves the maximum width for an element.
media
Sets or retrieves the media type.
minHeight
Sets or retrieves the minimum height for an element.
minWidth
Sets or retrieves the minimum width for an element.
msInterpolationMode
Sets or retrieves the interpolation (resampling) method used to stretch images.
orphans
Sets or retrieves
the minimum number of lines of a paragraph that must appear
at the bottom of a page.
outline
Sets or retrieves
the color, style, and width of the outline frame.
outlineColor
Sets or retrieves
the color of the outline frame.
outlineStyle
Sets or retrieves
the style of the outline frame.
outlineWidth
Sets or retrieves
the width of the outline frame.
overflow
Sets or retrieves a value indicating how to manage the content of the object when the content exceeds the height or width of the object.
overflowX
Sets or retrieves how to manage the content of the object when the content exceeds the width of the object.
overflowY
Sets or retrieves how to manage the content of the object when the content exceeds the height of the object.
padding
Sets or retrieves the amount of space to insert between the object and its margin or, if there is a border, between the object and its border.
paddingBottom
Sets or retrieves the amount of space to insert between the bottom border of the object and the content.
paddingLeft
Sets or retrieves the amount of space to insert between the left border of the object and the content.
paddingRight
Sets or retrieves the amount of space to insert between the right border of the object and the content.
paddingTop
Sets or retrieves the amount of space to insert between the top border of the object and the content.
pageBreakAfter
Sets or retrieves a value indicating whether a page break occurs after the object.
pageBreakBefore
Sets or retrieves a string indicating whether a page break occurs before the object.
pageBreakInside
Sets or retrieves
a string indicating whether a page break is allowed to occur inside the
object.
pixelBottom
Sets or retrieves the bottom position of the object.
pixelHeight
Sets or retrieves the height of the object.
pixelLeft
Sets or retrieves the left position of the object.
pixelRight
Sets or retrieves the right position of the object.
pixelTop
Sets or retrieves the top position of the object.
pixelWidth
Sets or retrieves the width of the object.
posBottom
Sets or retrieves the bottom position of the object in the units specified by the bottom attribute.
posHeight
Sets or retrieves the height of the object in the units specified by the height attribute.
position
Sets or retrieves the type of positioning used for the object.
posLeft
Sets or retrieves the left position of the object in the units specified by the left attribute.
posRight
Sets or retrieves the right position of the object in the units specified by the right attribute.
posTop
Sets or retrieves the top position of the object in the units specified by the top attribute.
posWidth
Sets or retrieves the width of the object in the units specified by the width attribute.
right
Sets or retrieves the position of the object relative to the right edge of the next positioned object in the document hierarchy.
rubyAlign
Sets or retrieves the position of the ruby text specified by the rt object.
rubyOverhang
Sets or retrieves the position of the ruby text specified by the rt object.
rubyPosition
Sets or retrieves the position of the ruby text specified by the rt object.
scrollbar3dLightColor
Sets or retrieves the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.
scrollbarArrowColor
Sets or retrieves the color of the arrow elements of a scroll arrow.
scrollbarBaseColor
Sets or retrieves the color of the main elements of a scroll bar, which include the scroll box, track, and scroll arrows.
scrollbarDarkShadowColor
Sets or retrieves the color of the gutter of a scroll bar.
scrollbarFaceColor
Sets or retrieves the color of the scroll box and scroll arrows of a scroll bar.
scrollbarHighlightColor
Sets or retrieves the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.
scrollbarShadowColor
Sets or retrieves the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar.
scrollbarTrackColor
Sets or retrieves the color of the track element of a scroll bar.
styleFloat
Sets or retrieves on which side of the object the text will flow.
tableLayout
Sets or retrieves a string that indicates whether the table layout is fixed.
textAlign
Sets or retrieves whether the text in the object is left-aligned, right-aligned, centered, or justified.
textAlignLast
Sets or retrieves how to align the last line or only line of text in the object.
textAutospace
Sets or retrieves the autospacing and narrow space width adjustment of text.
textDecoration
Sets or retrieves a value that indicates whether the text in the object has blink, line-through, overline, or underline decorations.
textDecorationBlink
Sets or retrieves a Boolean value that indicates whether the object's textDecoration property has a value of "blink."
textDecorationLineThrough
Sets or retrieves a Boolean value indicating whether the text in the object has a line drawn through it.
textDecorationNone
Sets or retrieves the Boolean value indicating whether the textDecoration property for the object has been set to none
.
textDecorationOverline
Sets or retrieves a Boolean value indicating whether the text in the object has a line drawn over it.
textDecorationUnderline
Sets or retrieves whether the text in the object is underlined.
textIndent
Sets or retrieves the indentation of the first line of text in the object.
textJustify
Sets or retrieves the type of alignment used to justify text in the object.
textKashidaSpace
Sets or retrieves the ratio of kashida expansion to white space expansion when justifying lines of text in the object.
textOverflow
Sets or retrieves a value that indicates whether to render ellipses(...) to indicate text overflow.
textTransform
Sets or retrieves the rendering of the text in the object.
textUnderlinePosition
Sets or retrieves the position of the underline decoration that is set through the textDecoration property of the object.
top
Sets or retrieves the position of the object relative to the top of the next positioned object in the document hierarchy.
type
Retrieves the CSS language in which the style sheet is written.
unicodeBidi
Sets or retrieves the level of embedding with respect to the bidirectional algorithm.
verticalAlign
Sets or retrieves the vertical alignment of the object.
visibility
Sets or retrieves whether the content of the object is displayed.
whiteSpace
Sets or retrieves a value that indicates whether lines are automatically broken inside the object.
widows
Sets or retrieves
the minimum number of lines of a paragraph that must appear
at the top of a page.
width
Sets or retrieves the width of the object.
wordBreak
Sets or retrieves
line-breaking behavior within words, particularly where multiple
languages appear in the object.
wordSpacing
Sets or retrieves the amount of additional space between words in the object.
wordWrap
Sets or retrieves whether to break words when the content exceeds the boundaries of its container.
writingMode
Sets or retrieves the direction and flow of the content in the object.
zIndex
Sets or retrieves the stacking order of positioned objects.
zoom
Sets or retrieves the magnification scale of the object.