Can we give width and border to <body>
and use in place of Container div? see this example
see source code of this file and code of file is also perfectly W3C valid. and looking same in IE 7 and firefox 3.5.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" dir="ltr">
<head>
<title> Width in body</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style type="text/css">
html { background-color: #00f; }
body{background: #cd5c5c;width:800px;height:400px;border:1px solid;color: #fff;margin:0 auto;}
</style>
</head>
<body>
<p>Hello world!</p>
</body>
</html>
While you can use body wash as shampoo once (or vice versa) in a while, it is not advised to do so regularly. Using a body wash on your hair could affect the pH level of your scalp, while a shampoo could change the pH level of the skin. This leaves your scalp or skin prone to damage, dryness, and other issues.
The skin on your face is far more delicate than the skin on your body. Facial cleansers have specific formulas to remove makeup and unclog pores. Facial skin is more sensitive than the skin on the rest of your body, so it's best to avoid using body wash on your face.
It's great for moisturizing: Bar soap is infamous for drying out skin, whereas body wash is better at moisturizing because many contain lotions or oils.
The bottom line. Putting body lotion on your face once or twice probably won't cause any lasting harm. All the same, body lotion isn't meant for facial skin, so it could make some skin concerns worse. Sticking to products specifically formulated for your face will generally do more to benefit your skin in the long run.
Your example answers your question! Body is a block element like any other. It has width, height, padding, margin and border properties.
Then can we use body in place of #container div? – Jitendra
What is the difference between viewport and body? – Jitendra
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With