HTML DOM cssFloat Property
Complete Style Object Reference
Definition and Usage
The cssFloat property sets where an image or text will appear (float) in another
element.
Syntax
Object.style.cssFloat=left|right|none
|
Possible Values
Value |
Description |
left |
The image or text will float to the left in the parent
element |
right |
The image or text will float to the right in the parent
element |
none |
The image or the text will be displayed just where it
occurs in the parent element |
Tips and Notes
Note: If there is too little space on a line for the floating element,
it will jump down on the next line, and continue until a line has enough space.
Example
The following example sets the image to float to the left of the text:
<html>
<head>
<script type="text/javascript">
function setFloat()
{
document.getElementById("img1").style.cssFloat="left";
}
</script>
</head>
<body>
<img id="img1" src="logocss.gif" width="95" height="84" />
<p>This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.</p>
<input type="button" onclick="setFloat()"
value="Set image to float to the left" />
</body>
</html>
|
Try-It-Yourself Demos
cssFloat - Set an image to float to the left of a text
Complete Style Object Reference
Make your web applications look like a million bucks
|
|
Most web applications today use boring methods to present data to their viewers using grids or simple HTML tables. FusionCharts induces "life" into the web applications by converting monotonous data into lively charts, gauges & maps.
FusionCharts works with all technologies like ASP, ASP.NET, PHP, ColdFusion, Ruby on Rails, JSP, HTML pages etc.
and connects to any database to render animated & interactive charts. It takes less than 15 minutes and no expertise
whatsoever to build your first chart and just a glance of it to captivate your audience. This fact is endorsed by our
12,000 customers and 150,000 users which include a majority of the Fortune 500 companies.
And yeah, your applications could look like a million bucks by spending just $69.
So go ahead, download your
copy of FusionCharts and start "wow-ing" your customers now!
|
|