Jump to content
Stef's Coding Community
Sign in to follow this  
NuCoder

Using Wrapper and Container

Recommended Posts

Sorry - another Newbie question

 

Is it necessary to use #wrapper & #container in a CSS page?

 

I tried making a quick page 900 px wide

 

First part of the HTML:

 

 

 

 

 

 

 

 

 

ConnObby

 

 

 

/* CSS */

 

CSS:

 

body {

 

background-color: #dbd7ab;

background-repeat: repeat-y;

 

}

 

#header {

 

}

 

#body {

 

width: 950px;

min-height: 1000px;

Text-align: center;

 

}

 

#container {

 

width: 975px;

min-height: 1000px;

margin: 0 auto;

text-align: left;

 

}

 

#wrapper {

 

position: relative;

margin: 0 auto;

 

}

 

 

Using a left navigation would I also need to use a #content for my main content or is this considered the #container. I ask this as I am having issues with the layout. Isn't the container - the browser window?

 

Also :

 

#navigation: {

 

float: left;

width: 200px;

min-height: 500px;

margin: 50px 10px 10px 15px;

padding: 10px;

border: right: 2px solid # #5C7452;

background-color: ##DBD8BA;

 

}

 

#mainCont {

 

width: 950px;

min-height: 1000px

margin: 50px 0px 10px 0px;

 

}

 

??

 

any input is greatly appreciated....

 

thank you -

Share this post


Link to post
Share on other sites

As Thelma says, you can name div tags anything under the sun. However it is best to name them according to their use, so it is easy to see what exactly they do. Don't confuse yourself by naming a div tag body,

is an html tag.

A simple set up, and by no means the only one, would be as follows:

 

All your footer info in here

 

 

The indentation helps to visually divide your page into sections and I personally always use the closing comment so I don't forget to close a div tag.

Share this post


Link to post
Share on other sites

Container and Wrapper are the same thing. Just two prominent naming conventions. Whether my web site is wrapped in it or contained in it does not matter. But yes it is a good idea to have one something between body and the actual web site. It is not required.... but can be very useful in complicated designs. I had to go back and add them after the fact so often that I simply build with them now so they are there if needed and if not... they hurt nothing.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...