Overflow auto method demonstrated
<!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" > <head> <title></title> <meta http-equiv= "Content-Type" content= "text/html; charset=iso-8859-1" /> <style type= "text/css" > #parent1 { border: 5 px solid purple; padding: 10 px; overflow: auto; width: 100 %; } .floatleft { border: 5 px solid red; float : left; width: 200 px; background: white; } .floatright { border: 5 px solid green; float : right; width: 200 px; background: white; } </style> </head> < body > <div id= "parent1" > <p>This is the first parent container</p> <p class = "floatleft" >This is floated content.</p> <p class = "floatright" >This is floated content.</p> </div> </ body > </ html >
HTML code for linking to this page:
Related in same category :