Understanding offsets
Tutorial “CSS website design using divs” continues. Let me introduce you now with Mr. Offset.
He is a man with 5 balloons. Ups, but looks like 2 balloons are running away.
What this basically mean — is that CSS left, right, top & bottom offsets for the div elements should be used only with: absolute, relative and fixed positioning. Offsets won’t work for position:static or position:inherit.
Here is the example for position:absolute where I used left and top offsets.
<html>
<head>
<style>
div.A {position:absolute; left:100px; top:50px; background:red;}
</style>
</head>
<body>
<div class="A">A div</div>
</body>
</html>
In the last article of this tutorial I will present one professional website design using divs that you may use for creating your onw web site or when creating your WordPress themes.
…
tags: html & category: css