Cross-Browser
CSS Properties:
Because
the goal of this document is to produce DHTML that works in both Netscape and
Internet Explorer, here are some of the CSS styles/properties we can use.
Generally, the following properties are the ones that work (fairly closely) to
the standards as defined by the W3C.
position
Defines how the DIV
tag will be positioned - "relative" means that the DIV tag will flow
like any other HTML tag, whereas "absolute" means the DIV will be
positioned at specific coordinates. Absolute positioning will be the topic of
most of this tutorial.
left
Left location (the
number of pixels from the left edge of the browser window).
top
Top location (the
number of pixels from the top edge of the browser window).
width
Width of the DIV
tag. Any text/html that is inserted into the DIV will wrap according to what
this value is. If width is not defined it will all be on one line.
Important:
When using layers for animation you should always define the width. This is because in IE the default is the entire width of the screen. If you move the layer around the screen a scrollbar will appear at the bottom, which is annoying and causes the animation to slow down.
When using layers for animation you should always define the width. This is because in IE the default is the entire width of the screen. If you move the layer around the screen a scrollbar will appear at the bottom, which is annoying and causes the animation to slow down.
height
Height of the DIV
tag. This property is rarely needed unless you also you want to clip the layer
clip
Defines the clipping
(crop) rectangle for the layer. Makes the DIV into a precisely defined square.
You define the size of the rectangle with the values of the four edges:
clip:rect(top,right,bottom,left);
clip:rect(top,right,bottom,left);
visibility
Determines whether
the DIV will be "visible", "hidden", or "inherit"
(default).
z-index
The stacking order
of DIV tags.
background-color
Background color of
the DIV. In Netscape this property only applies to the background color of the
text. When you want to draw squares with CSS you must also define the
layer-background-color property to the same value.
layer-background-color
Background color of
the DIV for Netscape.
background-image
Background image for
Internet Explorer. In Netscape this property only applies to the
background-image for the text.
layer-background-image
Background image of
the DIV for Netscape.
No comments:
Post a Comment
Please Give Your Valuable Comments on this Topic