Set height to 100% in HTML and CSS
Description
The following code shows how to set height to 100%.
Example
<!--from w w w . j a v a 2 s .co m-->
<html>
<head>
<title>percentage measurement</title>
<style rel='stylesheet' type='text/css'>
div {
font: 12px sans-serif;
border: 1px solid lightblue;
background: pink;
width: 100%;
height: 100%;
padding: 5px;
}
</style>
</head>
<body>
<div>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Vestibulum tellus orci, dignissim ut, consequat in, consectetuer
et, nibh. Donec luctus ante a neque convallis ultricies.
Curabitur ac lorem. Etiam adipiscing, nisi id eleifend feugiat,
dui lorem tempus lacus, at rutrum lectus ligula quis diam.
</div>
</body>
</html>
The code above generates the following result.
HTML CSS Tutorial Size
Compare height setting in inch and pixel in...
Compare width between pixel and inch measur...
Float blocks and percentage width in HTML a...
Set height auto in HTML and CSS
Set height for paragraph to 100px in HTML a...
Set max-height to 200px in HTML and CSS
Set max width in HTML and CSS
Set min height for three column layout in H...
Set min-width in HTML and CSS
Set min-width to 200px in HTML and CSS
Set width and height for paragraph in HTML ...
Set width and height to auto for table in H...
Set width and height to auto in HTML and CS...
Set width to 100% in HTML and CSS
Set width to 12em in HTML and CSS
Set width to 1in in HTML and CSS
Set width to 250px in HTML and CSS
Set width to auto in HTML and CSS
Use percentage value to set width and heigh...
Compare height setting in inch and pixel in...
Compare width between pixel and inch measur...
Float blocks and percentage width in HTML a...
Set height auto in HTML and CSS
Set height for paragraph to 100px in HTML a...
Set height to 100% in HTML and CSS
Set height to 1in(Inch) in HTML and CSSSet max-height to 200px in HTML and CSS
Set max width in HTML and CSS
Set min height for three column layout in H...
Set min-width in HTML and CSS
Set min-width to 200px in HTML and CSS
Set width and height for paragraph in HTML ...
Set width and height to auto for table in H...
Set width and height to auto in HTML and CS...
Set width to 100% in HTML and CSS
Set width to 12em in HTML and CSS
Set width to 1in in HTML and CSS
Set width to 250px in HTML and CSS
Set width to auto in HTML and CSS
Use percentage value to set width and heigh...