HTML and CSS Reference
In-Depth Information
When top and left are set to 50px and positioning is relative, you'll see the result shown in
Figure 1-45.
FIGURE 1-45 Positioning the second image relative to its neighboring element
Keeping the values the same but changing the positioning to absolute changes the posi-
tioning of the elements, as shown in Figure 1-46.
FIGURE 1-46 Positioning the second image absolute to its parent element.
You can employ yet another mechanism to change the appearance of an HTML element:
transforms, which you examine next.
Applying a transform
Applying transforms is a way to change an object on the webpage. Transforms enable you to
change an element's appearance. You can make an element larger or smaller, rotate it, and
so on. Quite a few transform methods are available. To add a transform to an element, you
declare it in the CSS for the element by adding the transform property as follows:
.rota {transform: rotate(90deg);}
 
 
Search WWH ::




Custom Search