Image Float Property

Image FloatĀ Property in CSS

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=’http://www.w3.org/1999/xhtml’ xml:lang=’en’>
<head>
<title>float</title>
<style type=’text/css’>
img {
margin: 10px;
border: 1px solid rgb(128, 128, 128);
}
img#starfish {
float: left;
}
img#lake {
float: right;
}
p {
font: 12px sans-serif;
}
</style>
</head>
<body>
<img src=’http://java2s.com/style/logo.png’ alt=’starfish’ id=’starfish’ />
<p>
This is paragraph !! This is paragraph !! This is paragraph !!
<img src=’lake.jpg’ alt=’Lake’ id=’lake’ />
This is paragraph !! This is paragraph !! This is paragraph !!
This is paragraph !! This is paragraph !! This is paragraph !!
</p>

</body>
</html>

 

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.