Total members 11361 |It is currently Tue Sep 30, 2014 10:46 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

All times are UTC [ DST ]



  Change the margin and padding of paragraph
Thu Feb 23, 2012 12:52 pm 

In this code we use CSS attributes to change the margin and the padding of two paragraphs .

Code:


<html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
title>Change the margin and the padding of the paragraph</title>
<
style type="text/css">

p.parah1 {
 
 margin
: 20px 21px 32px 0;
 padding: 0;
  border:1px dashed green;
}
p.parah2 {
 
 margin
: 0 3px 5px 2px;
 padding: 40px;
 border:1px solid red;
}

   

</style>
</
head>

<
body>
  <h1>Header Title</h1>

  

  
<p class="parah1" >This is the first paragraph , notice the margin configuration.</p>

<
p  class="parah2" > This is the second paragraph; CSS margin attribute takes the affects. </p>
</
body>
</
html>
 


_________________
Please recommend / share my post if you found it helpful.


Author:
Mastermind
User avatar Posts: 2694
Have thanks: 73 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : Change the margin and padding of paragraph
 change background of the paragraph     -  
 Change the word spacing in paragraph     -  
 Change the text indent in the paragraph     -  
 set margin to body tag     -  
 adding padding to your text     -  
 id Selector with paragraph     -  
 hide paragraph using jquery     -  
 Setting maximum height of paragraph -P tag     -  
 enlarge first letter in html paragraph     -  
 Changing the line height of the paragraph     -  

All times are UTC [ DST ]



Topic Tags

HTML Paragraph
cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team