Skip to main content

CSS - Margin VS Padding in hindi / kya h / kese lagaye technamdev.blogspot.com

CSS - Margin VS Padding

CSS Box Model in Hindi



  • Element Content : element का content होता है | For Example, some text, images
  • Padding : Padding ये border के अन्दर का हिस्सा होता है और ये element का हिस्सा होता है |
  • Border : Border ये padding और margin के बीच का हिस्सा होता है |
  • Margin : Margin ये border के बाहर का हिस्सा होता है और ये element का हिस्सा नहीं होता है |

Example

Example पर border की बाहरी space ये margin होती है | border की अन्दर की space ये padding होती है |
<style>
p{
padding : 100px;
margin : 100px;
border : 5px #F00 solid;
}
</style>
<p>CSS stands for Cascading Style Sheet</p> 
CSS stands for Cascading Style Sheet

Live Example


Understand the Example given about Margin and Padding

<p style="margin:50px;background-color:yellow;">
margin:50px;
</p>
<p style="padding:50px;background-color:yellow;">
padding:50px;
</p>
margin:50px;
padding:50px;

MarginPadding
Margin ये एक element से दूसरे element तक दूरी बनाये रखता है |Padding ये अपने element के content से दूरी बनाये रखता है |
Margin ये element का हिस्सा नहीं होता है |Padding ये element का हिस्सा नहीं होता है |
Margin ये element के बाहर होता है |Padding ये element के अन्दर होता है |



Box-Model in CSS

CSS में Margins, Border और Paddings की length अलग -अलग होती है |
For Example,
<p style="width:300px;border:5px #000 solid;">
Total Width = width 300px + left border 5px + right border 5px = 310px
</p>
<p style="width:308px;border:1px #F00 solid;">
Total Width = width 308px + left border 1px + right border 1px = 310px
</p> 
<p style="width:250px;border:30px #F00 solid;">
Total Width = 250px + left border 30px + right border 30px = 310px
</p> 
<p style="width:250px;padding:20px;border:10px #F00 solid;">
Total Width = 250px  + left padding 20px + right padding 20px + left border 10px + right border 10px = 310px
</p>
<p style="width:250px;margin:20px;border:10px #F00 solid;">
Total Width = 250px  + left margin 20px + right margin 20px + left border 10px + right border 10px = 310px
<strong>Note : Margin is outside the border.</strong>
</p>

Comments

Popular posts from this blog

Create a Website using HTML and CSS in Hindi With Source Codes

Create a Website using HTML and CSS in Hindi With Source Codes Welcome Developers, we will see how to create a website using HTML and CSS step by step in Hindi. The link is in Comment sections. In this Video, you will learn how to put everything you've learned so far about CSS into action—for your very first webpage. What you see now is going to look like your end result; I hope it inspires you to follow through with the whole project! You'll learn the components of this site and how it was put together, piece by piece. Also, website kaise banaye hindi me complete video. If you like this video please Like, Share with your friends and Don't forget to SUBSCRIBE my ThapaTechnical Channel :)

Create a Responsive Login Form in HTML and CSS in Hindi

Create a Responsive Login Form in HTML and CSS in Hindi                                                              Login Form in HTML and CSS In this video, we will we see How to Create a Responsive Login Form in HTML and CSS in Hindi step by step. As you can see I try to make a Login form that should be different from others available online on any social media. Believe me, you gonna learn many new technique and tips on how to make a Responsive Login Form in HTML and CSS in Hindi. Let's talk about the background of the Login form in Hindi first. You can see It's a diagonal background and I know must of are thinking how we can create a diagonal webpage. Believe me, I wrote only one line of code to get the diagonal background on my Login Form in Hindi. background-image: linear-gradient(to top right,...

ITI ES important question in hindi with pdf

  Technical INFO Click and go to my youtube chennel for more videos 1. निम्न में से कोनसा "पोजेसिव प्रोनाउन " है ? (A) Mine (B) Us  (C) He  (D) They Ans: A 2.  निम्न में से कोनसा "Good Bye" कहने से सम्बंधित है ? (A) How are you?  (B) See you soon (C) You can call me (D) Very well Ans: B 3. "Paradox" का पर्यायवाची है..............  (A) Paradise  (B) Question  (C) Puzzle  (D) Challenge  Ans: C 4. CV का पूर्ण रूप है........... (A) Curriculum Vita (B) Curriculum Vitesse (C) Curriculum Vitra (D) Curriculum Vitae Ans: D 5. "Good" का क्रिया विशेषण क्या है ? (A) Good (B) Better (C) Best (D)Well Ans: D 6. बोले गए शब्दों का लिखित भाषा में रूपातंरण होता है ? (A) प्रतिरोपण (B)  प्रसारण (C) प्रतिलेखन (D) अनुवादन Ans: C 7. प्रतिलेखन को ....... भी कहते हैं? (A) Notation (अंकन) (B) Citation (उद्धरण) (C) Translation (अनुवादन) (D) Transmission (प्रसारण) Ans: A 8. "Communication" शब्द लैटिन के किस शब्द से उत्पन्न हुआ है। (A) Community   (B) ...