How to Move a DIV Down in CSS
A "DIV" enables you to manipulate HTML data as a group. CSS styles provide you with a set of rules that allow you to control HTML attributes, such as background color, layout and position. Use the CSS “margin-top” style to increase the space above your DIV or HTML element group.
Instructions
-
-
1
Open your HTML document. Locate the DIV you want to modify.
-
2
Insert the “margin-top” style to add space and move the DIV down, for example 12 pixels:
<div style=”margin-top:12px;>
<p>One text paragraph</p>
<p>Another paragraph of text</p>
</div> -
-
3
Save the document. Open the Web page using a Web browser to test the space added above the DIV. Increase or decrease the pixel value as needed.
-
1
Resources
- Photo Credit Jupiterimages/Photos.com/Getty Images