Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Background issue

Featured Replies

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>

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 by Bomb

  • Author

Thankyou!!

 

What about other regions like mainbody images etc? shall I just expand on what you have just said?

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 by Bomb

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.