Div Tags
Div tags can be nice tools to help move any content on a webpage. Can’t seem to get that image right where you want it? Use a div! Tired of using a table styled web page? Construct it with divs. Div tags encompass only what is inside the tag. You can’t ID a div with a number first. For example:
<div id=”main”>
<p> Example </p>
</div>
<p> Example </p>
</div>
When you use CSS and reference body, only items within that div will be affected. To move the div to where ever you want it, you just need to add a float style. For example:
<div id=”body” style=”float: right”>
<p> Example </p>
</div>
<p> Example </p>
</div>
This will let you move that div area anywhere on your page using padding and margins. Be sure to reference a height and width to your invisible box to give it dimension!


Leave a Reply