sudhakarinfotech
(current)
Run Code
Live Code Editor- CSS Float Next To Each Other
Source Code
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>CSS Float</title> <style type="text/css"> div { float: left; padding: 15px; margin: 20px; } .example1 { background: orange; } .example2 { background: pink; } .example3 { background: green; } </style> </head> <body> <h1>CSS Float Property</h1> <p class="text-justify">Applying CSS float left property to more than one element.</p> <div class="example1">Block1.</div> <div class="example2">Block2</div> <div class="example3">Block3</div> </body> </html>
Source Code Output :
Running