HTML to demonstrate CSS positioning
<!DOCTYPE html> <html> <head> <title></title> <style type="text/css"> body { padding: 1em; font-family: sans-serif; border: dotted; } #d1 { width: 200px; height: 200px; border: dashed; } #d2 { width: 50%; height: 50%; border: solid; } </style> </head> <body> <div id="d1"> <div id="d2"></div> </div> </body> </html>