Friday, May 23, 2014

HTML TUTORIAL PART 48

HTML TUTORIAL PART 48

PROBLEM:
LOOK AT THE FOLLOWING:

In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever since.
'Whenever you feel like criticizing anyone,' he told me, 'just remember that all the people in this world haven't had the advantages that you've had.'
Note: Using margin:auto will not work in IE8, unless a !DOCTYPE is declared.


SOLVED:
THE CODE BELOW MADE THE HTML TIP:


<!DOCTYPE html>
<html>
<head>
<style>
.center
{
margin:auto;
width:70%;
background-color:#b0e0e6;
}
</style>
</head>

<body>
<div class="center">
<p>In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever since.</p>
<p>'Whenever you feel like criticizing anyone,' he told me, 'just remember that all the people in this world haven't had the advantages that you've had.'</p>
</div>
<p><b>Note: </b>Using margin:auto will not work in IE8, unless a !DOCTYPE is declared.</p>
</body>
</html>

No comments:

Post a Comment