Saturday, August 17, 2013

CSS dimension height

<html>
<head>
<style type="text/css">
img.normal {height:auto}
img.big {height:150px}
p.ex
{
height:100px;
width:100px;
}
</style>
</head>

<body>
<img class="normal" src="bird.jpg" width="150" height="112" /><br />
<img class="big" src="bird.jpg" width="150" height="112" />

<p class="ex">The height and width of this paragraph is 100px.</p>

<p>This is some text in a paragraph. This is some text in a paragraph.
This is some text in a paragraph. This is some text in a paragraph.
This is some text in a paragraph. This is some text in a paragraph.</p>
</body>
</html>

Result


No comments: