HTML CSS Programming, For Beginners, Quick Start Guide. by Ray Yao

HTML CSS Programming, For Beginners, Quick Start Guide. by Ray Yao

Author:Ray Yao [Yao, Ray]
Language: eng
Format: azw3
Publisher: Step by Step Tutorial eBook & Book
Published: 2020-08-06T16:00:00+00:00


Explanation: “margin: value” can set the margin width.

Absolute Positioning

The content position can be specified by position attribute.

position: absolute; top: value; left: value;

“position: absolute” sets the precise location of the contents.

“top: value” sets the distance from the top edge of the window.

“left: value” sets the distance from the left edge of the window.

Example 6.9

<html>

<style type = "text/css">

#a1{ position:absolute; top: 0px; left: 30px }

#a2{ position:absolute; top: 30px; left: 60px }

</style>

<p id = "a1">This is position1. </p>

<p id = "a2">This is position2. </p>

</html>

Output:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.