Happy Codings - Programming Code Examples
Html Css Web Design Sample Codes CPlusPlus Programming Sample Codes JavaScript Programming Sample Codes C Programming Sample Codes CSharp Programming Sample Codes Java Programming Sample Codes Php Programming Sample Codes Visual Basic Programming Sample Codes


HTML & CSS Web Design

Html Css > Code Examples

Div float with width and height

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
Div float with width and height <!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>Div Float With Width And Height</title> <style type='text/css'> div#container { font: 16px arial; margin: 0 20px; background: pink; width: 400px; } div#float { background: rgb(169, 196, 155); float: left; border: 1px solid blue; width: 120px; height: 60px; } p { margin-left: 80px; border: 1px solid red; } </style> </head> <body> <div id='container'> <div id='float'> Float text - O what a heaven is love! O what a hell! Thomas Dekker </div> <p> Someday, after mastering the winds,<br> the waves, the tides and gravity,<br> we shall harness for God the energies of love,<br> and then, for a second time in the history of the world,<br> man will have discovered fire.<br><br> Pierre Teilhard de Chardin </p> </div> </body> </html>