Sunday, 22 July 2012
How to Put Top, Bottom, Left and Right Margin in Paragraph/Gadget
Sometimes, mostly bloggers face the problem of alignment of the gadget or paragraphs. So now I am telling you that how you can apply margin to any HTML/JavaScript Gadget or Paragraph in HTML.
Top Margin:
<p style="margin-top : 2em;">
This paragraph has a 2 em margin top.
</p>
Bottom Margin:
<p style="margin-bottom : 0.7em;">
This paragraph has a 0.7 em margin bottom.
</p>
Left Margin:
<p style="margin-left : 1em">
This paragraph has a 1 em margin left.
</p>
Right Margin:
<p style="margin-right : 2em">em is a measurement unit like px for html/xml. You can change it for your code accordingly.
This paragraph has a 2 em margin right.
</p>
Author: Muhammad Faheem Usama
Muhammad Faheem Usama is a professional blogger, web designer/ developer and Founder of BHD. He belongs to
Read More →
Subscribe to:
Post Comments
(
Atom
)
0 comments :