Set height to 1in(Inch) in HTML and CSS
Description
The following code shows how to set height to 1in(Inch).
Example
<html>
<head>
<style type='text/css'>
div {<!--from w ww .j a v a 2s .c o m-->
background: #000;
border: 1px solid rgb(128, 128, 128);
color: white;
font: 9px monospace;
margin: 15px;
text-align: center;
}
div#inches {
width: 1in;
height: 1in;
}
div#pixels {
width: 96px;
height: 96px;
}
</style>
</head>
<body>
<div id='inches'><-- 1 Inch --></div>
<div id='pixels'><-- 96 Pixels --></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 height to 100% 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 CSS
Set max-height to 200px in HTML and CSSSet 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...