उदाहरण
cssFloat प्रॉपर्टी से एलिमेंट को क्षैतिज रूप से फ्लोट करें (बाएँ/दाएँ)।
<!DOCTYPE html>
<html>
<body>
<img id="myID" src="https://www.tutorialspoint.com/videotutorials/images/tutor_connect_home.jpg" width="300" height="300">
<p>यह डेमो टेक्स्ट है। यह डेमो टेक्स्ट है। यह डेमो टेक्स्ट है। यह डेमो टेक्स्ट है। यह डेमो टेक्स्ट है। यह डेमो टेक्स्ट है। यह डेमो टेक्स्ट है। यह डेमो टेक्स्ट है।</p>
<button type="button" onclick="display()">क्षैतिज रूप से अलाइन करें</button>
<script>
function display() {
document.getElementById("myID").style.cssFloat = "right";
}
</script>
</body>
</html>
नोट: JavaScript में float रिज़र्व्ड शब्द है, इसलिए cssFloat उपयोग किया जाता है (IE में styleFloat)। आधुनिक लेआउट के लिए flexbox या grid बेहतर हैं।