With the knowledge of CSS positioning, you will be able to manipulate the exact location of HTML elements. Design: JavaScript or HTML image map is used before. Now we can do this in CSS. It is not only easy to code, but it also loads faster!
Relative position
The location of the HTML element relative to the location of the location change usually appears. If we have a title that appears on the webpage above us, we can use relative positioning to move it to a bit of authority and reduce the number of pixels. The following is an example.
H3 {
Position: relative;
Top: 15px;
Left: 150px;
}
P {
Position: relative;
Left:-10px;
}
You may have noticed that you have determined only two possible directions (left, right, top, bottom) (left and top ). Here is a quick move reference to the HTML element in CSS.
Move to left-use a negative value to exit.
Move to the right-use a positive value.
Move up-use a negative value to the top.
Move down-use a positive value with the highest value.
Absolute position
Absolute positioning: The exact pixel value you define will appear in the specified HTML element. The starting point is the visible area of the leftmost browser, so be sure to measure from this point.
Note: Firefox does not currently provide a correct explanation. But these two 6.0 + and Opera 8.0 + are used.
H3 {
Position: absolute;
Top: 50px;
Left: 45px;
}
P {
Position: absolute;
Top: 75px;
Left: 75px;
}
Now the tutorial is OK.