Creating a box with a Div
Do you want a highlight box, but don’t want to have to go through the trouble of tables? Using divs to create a highlight box is much faster and easier then using tables. Once you have created your box you can use the float style to position your box where ever you want it. An example of creating a box with divs would be:
<div id=”body” style=”border: 1px solid blue”>
<p> Example </p>
</div>
<p> Example </p>
</div>
Notice the border style I put in this code. You can change the pixel of your border to make the line thicker. Here is an example of this code in use (I added a height and width to mine to scale the box to my text):
Example


Leave a Reply