sircharlo Posted July 4, 2007 Share Posted July 4, 2007 Hey, guys ! (and gals)I need to replicate a normal paragraph with a span tag.I was wondering: what is the default value for a paragraph's top and bottom margins ?Thnx alot Link to comment Share on other sites More sharing options...
aspnetguy Posted July 4, 2007 Share Posted July 4, 2007 according to this test I ran <html><head> <title></title> <style> div.line { padding:5px; background: #424242; } span.para { display: block; margin-top:16px; margin-bottom:16px; } </style> <!--[if IE]> <style> span.para { display: block; margin-top:19px; margin-bottom:19px; } </style> <![endif]--></head><body> <table cellpadding="0" cellspacing="0"> <tr> <td> <div class="line"></div> <p>paragraph</p> <div class="line"></div> </td> <td> <div class="line"></div> <span class="para">span</span> <div class="line"></div> </td> </tr> </table></body></html> <p> in standards compliant browsers have a top and bottom margin of 16px and IE6 and 7 have a top and bottom margin of 19px. The code above shows how to make a span tag behave like a paragraph tag. I tested this in IE6, IE7, Firefox 2.0.0.4, and Opera 9.2 Link to comment Share on other sites More sharing options...
sircharlo Posted July 5, 2007 Author Share Posted July 5, 2007 Thank you so much ! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.