August 1999
Intermediate to advanced
1488 pages
72h 53m
English
document.tags.tagName.marginTop
The marginTop property specifies the distance between the top border of an element and the bottom border of another element. Dot notation is used to associate this property with the tag called tagName.
Listing 7.185 uses the marginTop property to set the distance between adjacent elements.
<html> <script> <!-- Hide //Create a style sheet id and tag that defines top margin document.ids.BORDER.borderWidths(10); document.tags.B.marginTop = 40; //Hide End ---> </script> <i id=BORDER>My margins are set automatically</i><br> <b id=BORDER>I have a large top margin!</b> <i ... |
Read now
Unlock full access