| 
									
										
										
										
											2018-10-12 15:37:13 -04:00
										 |  |  | --- | 
					
						
							|  |  |  | title: Adjust the Padding of an Element | 
					
						
							|  |  |  | --- | 
					
						
							| 
									
										
										
										
											2019-07-24 00:59:27 -07:00
										 |  |  | # Adjust the Padding of an Element
 | 
					
						
							| 
									
										
										
										
											2018-10-12 15:37:13 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-24 00:59:27 -07:00
										 |  |  | --- | 
					
						
							|  |  |  | ## Problem Explanation
 | 
					
						
							| 
									
										
										
										
											2018-10-12 15:37:13 -04:00
										 |  |  | Padding is the spacing between the content and the border of an Element. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   •There is spacing from the top, bottom, left, and right.  | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   •The spacing is a numerical value that increases or decreases by units of pixels that is written as `px`. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | To adjust the Padding of an Element, use: | 
					
						
							|  |  |  | ```css | 
					
						
							|  |  |  | padding: 10px; | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | To create Padding as a class for a specific Element, use: | 
					
						
							|  |  |  | ```css | 
					
						
							|  |  |  | .example-Padding { | 
					
						
							|  |  |  |   padding: 10px | 
					
						
							| 
									
										
										
										
											2019-03-09 04:43:55 +05:30
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2018-10-12 15:37:13 -04:00
										 |  |  | ``` | 
					
						
							|  |  |  | To apply this class to the appropriate field, use: | 
					
						
							|  |  |  | ```html | 
					
						
							|  |  |  | <div class="example-Padding"> | 
					
						
							|  |  |  | <p> Example Text </p> | 
					
						
							|  |  |  | </div> | 
					
						
							|  |  |  | ``` | 
					
						
							|  |  |  | <b>To Adjust the Padding of an Element</b>, use: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | padding: `10`px; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   Now modify the numerical value to the desired amount. | 
					
						
							|  |  |  |    | 
					
						
							|  |  |  | padding: `50`px; |