CSS DIMENSIONS
Css-dimensions
The CSS dimension properties allow you to control the height and width of an element.
Properties:
height : It is used to set the height of a box.
width : It is used to set the width of a box.
line-height : It is used to set the height of a line of text.
max-height : It is used to set a maximum height of a box .
min-height: It is used to set the minimum height of a box .
max-width : It is used to set the maximum width of a box.
min-width : It is used to set the minimum width of a box .
Example:34
<html><head><title>height-width properties</title></head>
<body>
<p style="width:500px; height:200px;border:3px solid green;
padding:6px;margin:15px;line-height:30px">This paragraph is 500pixels wide and 200 pixels high.</p> </body></html>
Example:35
<html><head><title>css max-height</title></head><body>
<p style="width:400px; max-height:10px;border:3px solid blue;
padding:5px; margin:10px;">
This paragraph is 400px wide and max height is 10px
This bomma......... image is 400px wide and max height is 10px
This gif file is 400px wide....... and max height is 10px
It is 400px wide and max height........ is 10px</p>
<img alt="bomma" src="d:\css\bomma.gif" width="60" height="70" /> </body></html>
Example:36
<html><head>
<style>
P { max-width:10%; background-color:yellow; }
</style></head>
<body><p>example for css dimension properties.It is maximum width of paragraph.Its color of yellow.</p>
</body></html>
No comments:
Post a Comment