CSS tutorial-page margin control


CSS

Page margin control

You can use CSS code to define the margins of the web page. To set the left margin, right margin, top margin, and bottom margin, you need to use margin-left, margin-right, margin-top, and margin-bottom attributes respectively.

Example:

<html>

<head>

<style type="text/css">


body{
margin-left: 50px;
margin-right: 10px;
margin-top: 10px;
margin-bottom: 10px;

}

</style>

<title>Margin control with CSS</title>

</head>

<body>


<p> The margins of a web page can be controlled by using css code. The margins of a web page can be controlled by using css code.The margins of a web page can be controlled by using css code.</p>

</body>



</html>




Comments





This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.