شما اینجا هستید

همه عناصر HTML را میتوان شبیه به یک جعبه (کادر) در نظر گرفت. هنگامی که در CSS در مورد طراحی و لایه بندی صحبت میکنیم واژه مدل جعبه ای را به کار میبریم.

مدل جعبه ای CSS در اصل یک کادر است که عناصر HTML را احاطه کرده و شامل margin, border, padding و محتوای عنصر است. مدل جعبه ای به ما این امکان را میدهد که دور عناصر حاشیه اضافه و بین آنها فاصله تعریف کنیم.

تصویر زیر مدل جعبه ای را به تصویر کشیده:

مدل جعبه ای

توضیح قسمت های مختلف :

  • Content : محتوای داخل کادر که متن و تصویر میباشد
  • Padding : ناحیه خالی دور محتوا است. مانند شکل بین محتوا و حاشیه قرار دارد. حاشیه داخلی (padding) دیده نمیشود.
  • Border : حاشیه ای است که دور paddingو محتوا کشیده میشود
  • Margin : ناحیه خالی خارجی که دور حاشیه است. حاشیه خارجی (margin) دیده نمیشود
<html>

<head>

<style>

div {

    background-color: lightgrey;

    width: 300px;

    padding: 25px;

    border: 25px solid navy;

    margin: 25px;

}

</style>

</head>

<body>


<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>


</body>

</html>

 

پهنا و ارتفاع عنصر

 

برای تنظیم کردن ارتفاع و پهنای یک عنصر به طوریکه در همه مرورگرها به درستی نمایش داده شود نیاز داریم که بدانیم مدل جعبه ای چگونه کار میکند.

هنگامی که ویژگی پهنا و ارتفاع یک عنصر را با CSS تنظیم میکنید، فقط ارتفاع و پهنای ناحیه محتوا را تنظیم میکنید. در صورتیکه برا ی محاسبه اندازه کامل یک عنصر، باید padding, border و margin را نیز اضافه کنید.

کل پهنای عنصر <div> در مثال پایین 350px میشود:

div {
    width: 320px;
    padding: 10px;
    border: 5px solid gray;
    margin: 0;
}

 

حالا حساب میکنیم :

 

320px (width)
+ 20px (left + right padding)
+ 10px (left + right border)
+ 0px (left + right margin)
= 350px

پهنای کل یک عنصر شبیه به این نمونه محاسبه میشود:

پهنای کل عنصر = پهنا + حاشیه داخلی چپ + حاشیه داخلی راست + حاشیه چپ + حاشیه راست + حاشیه خارجی چپ + حاشیه خارجی راست

ارتفاع کل یک عنصر شبیه به این نمونه محاسبه میشود:

ارتفاع کل عنصر = ارتفاع + حاشیه داخلی بالا + حاشیه داخلی پایین + حاشیه بالا + حاشیه پایین + حاشیه خارجی بالا + حاشیه خارجی پایین

دیدگاه‌ها

quick loans direct best egg loans/quick Payday loan private lenders funding quick loans no collateral no up front fees no vredit checks quick online business loans

quick loans home personal loans quick Payday loan quick cash loans scam quick loans home

https://paydailoanz.com/# - loan payday

how to make extra money from home best way to make passive income how much money does pewdiepie make making money on youtube how to make money on instagram

passive income streams how to earn money online walmart to walmart money transfer online ways to make money online make money online free

https://make-money-blogs.com/# - real work from home jobs

coronavirus coronavirus symptoms in humans coronavirus genome coronavirus disease cdc coronavirus

cat tested positive for coronavirus what is mers coronavirus cdc mers coronavirus is coronavirus contagious novel coronavirus

https://pharm-usa-official.com/coronavirus/# - coronavirus disease

how to make money on youtube passive income ideas legitimate work from home jobs legitimate work from home jobs work at home

how to make money on youtube make money blogging how to make money on the internet best way to make passive income passive income streams

https://make-money-blogs.com/# - make money online free

cat tested positive for coronavirus coronavirus dogs coronavirus canine cdc coronavirus equine coronavirus

coronavirus nl63 how to treat coronavirus coronavirus in calves coronavirus in horses buy coronavirus

https://pharm-usa-official.com/coronavirus/# - coronavirus disease

home work osrs money making how to make money on the internet walmart to walmart money transfer online make money blogging

how to make money blogging money online online poker real money legitimate work at home companies making money on youtube

https://make-money-blogs.com/# - how to make money on the internet

best weight loss diet best diet for weight loss weight loss clinic sota weight loss joaquin phoenix weight loss

weight loss clinic melissa mccarthy weight loss fast weight loss golo weight loss kelly clarkson weight loss

https://weight-loss-blogs.com/# - weight loss before and after

optivia weight loss red mountain weight loss medi weight loss best protein powder for weight loss gabourey sidibe weight loss before and after

best weight loss diet keto advanced weight loss weight loss clinic medically proven weight loss supplements jorge garcia weight loss

https://weight-loss-blogs.com/# - fast weight loss

safflower oil for weight loss fasting for weight loss weight loss clinic shark tank weight loss melissa mccarthy weight loss

weight loss plan celine dion weight loss weight loss calculator aretha franklin weight loss intermittent fasting for weight loss

https://weight-loss-blogs.com/# - apple cider vinegar weight loss

chrissy metz weight loss weight loss before and after medical weight loss celine dion weight loss weight loss foods

quick weight loss nathan fillion weight loss before and after weight loss beth chapman weight loss apple cider vinegar for weight loss

https://weight-loss-blogs.com/# - intermittent fasting weight loss

hypnosis for weight loss shark tank weight loss before and after weight loss alli weight loss apple cider vinegar weight loss drink

gabourey sidibe weight loss before and after rebel wilson weight loss chrissy metz weight loss protein shakes for weight loss yoga for weight loss

https://weight-loss-blogs.com/# - apple cider vinegar weight loss

wife jumped on my viagra dick can women take viagra viagra cialis vs viagra can viagra help last longer

best omline viagra cialis viagra interaction viagra viagra prank done on boyfriend is viagra covered by insurance

https://pharm-usa-official.com - viagra

viagra samples from pfizer stepmom viagra viagra are there natural sex stimulates that i should take with viagra viagra multiple cums

interactions for viagra geting an erection after viagra viagra what does walgreens charge for 100 mg viagra wife massage viagra

https://pharm-usa-official.com - viagra

buy tadalafil online tadalafil biogaran tadalafil 20 mg tadalafil cost tadalafil mylan

cialis generic cialis tadalafil tadalafil 20 buy tadalafil online tadalafil liquid tadalafil 5 mg

https://supertadalafil.com/ - generic cialis tadalafil

tadalafil vs sildenafil generic tadalafil tadalafil liquid mylan tadalafil tadalafil vs vardenafil

tadalafil 10 mg tadalafil 5 mg tadalafil dosage cialis-impuissance tadalafil tadalafil powder

https://xtadalafilx.com/ - tadalafil cialis

interactions for tadalafil adcirca tadalafil cheap tadalafil tadalafil online canadian pharmacy tadalafil vs vardenafil

tadalafil en ligne tadalafila liquid tadalafil tadalafil prix tadalafil biogaran 20 mg prix

https://supertadalafil.com/ - tadalafil liquid

tadalafil 20mg avis tadalafil 5 mg tadalafil liquid tadalafil generic vs cialis tadalafil 10mg

tadalafil side effects tadalafil 5mg prix liquid tadalafil generic cialis tadalafil 20mg tadalafil 20mg

https://xtadalafilx.com/ - generic tadalafil

generic cialis tadalafil tadalafil en ligne tadalafil reviews what is tadalafil buy cialis ebay find tadalafil

tadalafil 20mg prix tadalafil generic usa liquid tadalafil tadalafil generique en pharmacie generic cialis tadalafil best buys

https://supertadalafil.com/ - tadalafil dosage

purchase peptides tadalafil tadalafil online buy tadalafil online generic cialis tadalafil tadalafila 20mg

tadalafila tadalafil tablets 20 mg cheap tadalafil tadalafil reviews tadalafil generique

https://xtadalafilx.com/ - generic cialis tadalafil

generic cialis tadalafil 20mg prix tadalafil tadalafil generic tadalafil pronunciation tadalafil generic cialis 20 mg

tadalafil 20 generic cialis tadalafil buy tadalafil online tadalafil 10 mg tadalafil generique en pharmacie

https://supertadalafil.com/ - cialis tadalafil

prix tadalafil side effects for tadalafil tadalafil dosage tadalafil cost tadalafil vs viagra

buy cialis ebay find tadalafil tadalafil 5mg prix tadalafil 20 mg tadalafil generique en pharmacie buy cialis ebay find tadalafil

https://xtadalafilx.com/ - cialis tadalafil

levitra generic levitra dosage vardenafil levitra levitra generic levitra

buy levitra online levitra cheap levitra buy levitra online vardenafil levitra

https://drugstoreonliner.com/ - levitra 10mg

testosterone levels by age testosterone overdose testosterone supplements natural testosterone gel testosterone injection

testosterone injection low testosterone icd 10 testosterone levels testosterone injections for men testosterone overdose

https://pharm-usa-official.com/testosterone.php - low testosterone symptoms

testosterone levels side effects of testosterone injections testosteron low testosterone in women la testosterone

testosterone booster testosterone testosterone gel testosteron masterburation testosterone

https://pharm-usa-official.com/testosterone.php - testosterona

generic levitra online buy levitra online levitra generic levitra canada cialis 20mg

generic levitra online levitra coupon online levitra cheap levitra levitra 20

https://drugstoreonliner.com/ - vardenafil levitra

testosterone medication what produces testosterone TestoRapid amp granite testosterone testosterone test

testosterone side effects in men what produces testosterone best testosterone supplements for men symptoms of low testosterone in men symptoms of low testosterone

https://pharm-usa-official.com/testosterone.php - Rexogin amp

can a man take viagra if he has high blood pressure she gives him viagra viagra how long should you wait when taking viagra is viagra safe

mom gives son high dose of viagra average age men use viagra viagra viagra taboo typical age viagra

https://pharm-usa-official.com - viagra

best free antivirus best free antivirus https://xantivirusx.com/ - free antivirus for windows 10 who is blake shelton dating? who is blake shelton dating? https://onlinedatingwow.com/ - dating sim pch sweepstakes entry bhg free sweepstakes https://supersweepstakesx.com/ - hgtv dream home 2020 sweepstakes

mcafee antivirus avast! antivirus avast antivirus https://xantivirusx.com/ - kaspersky antivirus dating daddy odette part 2 dating sites free https://onlinedatingwow.com/ - christian dating for free hgtv sweepstakes bhg sweepstakes https://supersweepstakesx.com/ - wheel of fortune sweepstakes

It is ________ of a test as only three branches of the Boots nationwide pharmacy will sell the drug.Viagra generally works within 30 minutes, and its effect may be diminished if taken soon after a high fat meal which may also delay how fast it works.Some other factors which may influence the effects of Viagra are as follows.Mandatory consultation with a specialist will allow to test the drug and avoid individual intolerance.He didn t take Viagra on the same day, said Patrick, so I suspect it s a non-issue. viagra online You will not need to go to the pharmacy, you can easily shop for it, and it is delivered right to your door, with no one being any wiser as to what is going on.You will need to complete a simple online questionnaire which will be reviewed by one of our doctors.They also have a portal on their website that allows you to contact them directly via email.com reported that illegal Viagra was responsible for a large portion of counterfeit medicine seizures.However, there are subtle differences in how long they stay effective and how quickly they begin to work. buy viagra online All PDE 5 inhibitors are symptomatic and produce the expected effect only in the case of sexual stimulation.Fast recent analogues of 10, free pills.Buy Generic Viagra Online - Safe and beneficial.Although the data presented above suggest a potential inverse association between intake of milk and breast cancer risk, several potential confounders were not statistically significant; for example, in order to detect differences with regard to other risk factors for breast cancer such as smoking, the use of dietary supplements, physical activity, or socioeconomic status, a direct comparison of milk consumption with these additional covariates would have been advantageous.If its no secret, sir, said Betteredge, suddenly abandoning the crooked way, and taking the straight one, Im burning to know whats brought you down here, if you please, in this sudden way womenra sildenafil 100mg female herbal viagra tablets. https://pharm-usa-official.com - viagra generic Instructions for using Viagra tablets.who have had a recent 6 months acute myocardial infarction AMI or stroke.ITSOKTOCRY VIAGRA Feat 909MEMPHIS EARRAPE All These Racks Give Me A Boner.The mechanism of action.How and Where to buy female viagra for sale.

avastui.exe avast antivirus free antivirus software 2019 https://xantivirusx.com/ - avast! antivirus avast antivirus kathie lee gifford dating xname dating https://onlinedatingwow.com/ - badoo dating site slickdeals contests and sweepstakes forum woman's day sweepstakes https://supersweepstakesx.com/ - reader's digest sweepstakes

twin river casino
jackpot party casino
https://playcasinoslotsx.com - free casino games vegas world
how to lose weight fast
best weight loss pills
https://weight-loss-blogs.com - weight watchers
how to make
how to get money
https://make-money-blogs.com - how to get money

foxwoods casino
doubledown casino promo codes
https://playcasinoslotsx.com - 4 winds casino
weight loss calculator
apple cider vinegar weight loss
https://weight-loss-blogs.com - best way to lose weight
how to get money
how to make money from home
https://make-money-blogs.com - how to make money online

افزودن دیدگاه جدید

دیدگاه

  • تگ‌های HTML مجاز: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • خطوط و پاراگراف‌ها بطور خودکار اعمال می‌شوند.
  • نشانی صفحه‌ها وب و پست الکترونیک بصورت خودکار به پیوند تبدیل می‌شوند.

Plain text

  • تگ‌های HTML مجاز نیستند.
  • نشانی صفحه‌ها وب و پست الکترونیک بصورت خودکار به پیوند تبدیل می‌شوند.
  • خطوط و پاراگراف‌ها بطور خودکار اعمال می‌شوند.
كد امنيتي
این پرسش برای جلوگیری از ارسال اسپمهای اتوماتیک است.