January 11, 201214 yr Hi. I am wanting to create a rounded page border which is centralised in the middle of my page where i can then insert all my content inside it. Only I realised once i made the div tag that i could not insert other div's inside it. Or can i? here is the code I have used so far.. Any help or if anyone could point me in the right direction.. thanks.. <style type="text/css"> #demo { width:800px ; height:1000px ; background:#D7D7D7; display: block; margin-left: auto; margin-right: auto; -moz-box-shadow: 10px 10px 5px; -webkit-box-shadow: 10px 10px 5px; box-shadow: 10px 10px 5px; -moz-border-radius: 10px 10px 10px; border-radius: 10px 10px 10px; } body { background-color: #060; } </style> </head> <body> <div id="demo"></div> <div id="header"></div> </body> </html>
January 11, 201214 yr Try this... <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> <style type="text/css"> body { background-color: #060; } #wrapper{ width:100%; } #demo { width:800px ; margin: 0px auto; height:1000px ; background:#D7D7D7; display: block; margin-left: auto; margin-right: auto; -moz-box-shadow: 10px 10px 5px; -webkit-box-shadow: 10px 10px 5px; box-shadow: 10px 10px 5px; -moz-border-radius: 10px 10px 10px; border-radius: 10px 10px 10px; } </style> </head> <body> <div id="wrapper"> <div id="demo"> <div id="header"></div> </div> </div> </body> </html> You can then add further divs inside the demo div to add your content. You should probably look at using a .css file to keep your styles separate from the content. Edited January 11, 201214 yr by Bomb
January 11, 201214 yr Author Thankyou!! What about other regions like mainbody images etc? shall I just expand on what you have just said?
January 11, 201214 yr Yes just add further divs like so... <body> <div id="wrapper"> <div id="demo"> <div id="header"></div> <div id="pageContent"></div> <div id="footer"></div> </div> </div> </body> ... Notice they are all inside the final closing #demo div tag. Then style them in your css. Edited January 11, 201214 yr by Bomb
Create an account or sign in to comment