WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1Accespted Creating Containers Tutorial on Sun Apr 24, 2011 1:03 am

Drogba921


Registered Member
Registered Member
Creating Containers
Learn how to create a simple container


Note: Tutorial Copied from another website I posted it on. Full tutorial written by myself.

**Sadly i must use images since i cant use code on this page -.-

Hello Users of WebArtz!

Today i'm going to show you how to set up Containers using CSS and tags. This is a simple property that can be done using both CSS and HTML, or intertwining the two.

In today's tutorial i'm just going to show you how to make one container, but this will make you able to change some things around in it and add some other properties to make it just perfect for your liking. Very Happy

---
First off, the CSS.

Code:
.container {
   margin: 0 auto;
   width: 1000px;
   background: #005094;
   overflow: hidden;
   padding: 20px;

}


What are each of these tags?

Margin - how far into a page something begins, in this case, auto, makes the container centered on the page.

Width - This is the width of the container, mine is 1000px, I used it on my old site. You can make this container any size, however I'd recommend having it 960 px, because that's still wide, and not all computers have a 1000px wide screen!

Background - This makes it so you can control the background color, this color can be changed to whatever you like, however i'd be careful how you do it, because this might make your eyes hurt if you choose the wrong color. Don't choose something too obnoxious. It's not required to have this tag.

Overflow - This means that if anything goes outside of the containers width, it becomes hidden, meaning you will not see it. It's not required to have this tag.

Padding - This is the number of Pixels around the edges, if you were to resize your window, 20 px would always stay on the side so that the whole page does not " collapse on itself".

---

Now let's integrate the HTML.

Code:
<div id="container">Container Content</div>


This is what you'd put on the page and then write your content between the closing tag.

---

How do i put this on a page?

Do the following (laid out like a webpage)

Code:
<html>
<head>
<style type="text/css">
#container {
   margin: 0 auto;
   width: 960px;
   background: #005094;
   overflow: hidden;
   padding: 20px;
   min-height:500px;
}
</style>
</head>
<body>
<div id="container">Container Content Here</div>
</body>
</html>


Can I put this together?

Sure! Just do the following in your DIV Tag.

Code:
<div style="margin: 0 auto;width: 850px;background: #005094;overflow: hidden;padding: 20px;min-height:500px;>Container Content Here</div>


You can also use a CSS file, and link it.


Of course there is more to making a page than this, however you'll have to wait for more tutorials to see!





Until next time, Peace out,

--drogba921

Notice : This tutorial is copyrighted by WebArtz Forum. You may not publish it on anywhere without written permission from the administrators.

http://www.codinghelp.org

2Accespted Re: Creating Containers Tutorial on Sun Apr 24, 2011 2:35 am

RockerMan


WebArtz Technician
WebArtz Technician
Why have you got it set at 1000px?

Conatiner should never go above 960px realy, 1000px will not fit on all standard monitors and as a web design thats your end goal. To get things to work on most monitors and browsers...

http://www.graphics-post.com/

3Accespted Re: Creating Containers Tutorial on Sun Apr 24, 2011 2:47 am

Drogba921


Registered Member
Registered Member
Its just a number Wink

The actual demo is at 800 I belive.

http://www.codinghelp.org

4Accespted Re: Creating Containers Tutorial on Mon Apr 25, 2011 8:21 pm

RockerMan


WebArtz Technician
WebArtz Technician
OK then,

Be a little more clear next time as members seem to just copy and paste code Smile

http://www.graphics-post.com/

5Accespted Re: Creating Containers Tutorial on Fri Apr 29, 2011 4:36 pm

Ezio


Registered Member
Registered Member
hello, Just little ask , can we create a shadow on this container? I mean the shadow behind the container,
so to make container look more real and good. cyclops
Thanks in advance. Cool

http://www.forumbargedoz.ce.ms

6Accespted Re: Creating Containers Tutorial on Fri Apr 29, 2011 5:27 pm

RockerMan


WebArtz Technician
WebArtz Technician
Sure you can, only works with CSS3 browsers though Smile

Code:
-moz-box-shadow: 1px 10px #373737;
-webkit-box-shadow: 1px 10px #373737;
-khtml-box-shadow: 1px 10px #373737;
box-shadow: 1px 10px #373737;


Hope this helps Wink


_________________


No support via. PM, as they will just be deleted
http://www.graphics-post.com/

7Accespted Re: Creating Containers Tutorial on Fri Apr 29, 2011 7:26 pm

Ezio


Registered Member
Registered Member
RockerMan wrote:Sure you can, only works with CSS3 browsers though Smile

Code:
-moz-box-shadow: 1px 10px #373737;
-webkit-box-shadow: 1px 10px #373737;
-khtml-box-shadow: 1px 10px #373737;
box-shadow: 1px 10px #373737;


Hope this helps Wink


waw, this is very helpful!, perhaps only using box-shadow it could make a shadow, but is it possible we could make a blur on the shadow? I think the shadow is too obvious.

Thanks Before Cool

http://www.forumbargedoz.ce.ms

8Accespted Re: Creating Containers Tutorial on Fri Apr 29, 2011 7:54 pm

RockerMan


WebArtz Technician
WebArtz Technician
Sure
Code:
-moz-box-shadow: 1px 1px 10px #373737;
-webkit-box-shadow: 1px 1px 10px #373737;
-khtml-box-shadow: 1px 1px 10px #373737;
box-shadow: 1px 1px 10px #373737;


_________________


No support via. PM, as they will just be deleted
http://www.graphics-post.com/

9Accespted Re: Creating Containers Tutorial on Fri Apr 29, 2011 9:04 pm

Ezio


Registered Member
Registered Member
RockerMan wrote:Sure
Code:
-moz-box-shadow: 1px 1px 10px #373737;
-webkit-box-shadow: 1px 1px 10px #373737;
-khtml-box-shadow: 1px 1px 10px #373737;
box-shadow: 1px 1px 10px #373737;


Just add one px again, waw!
Thanks in advance, its very working ! pirat

http://www.forumbargedoz.ce.ms

10Accespted Re: Creating Containers Tutorial on Fri Apr 29, 2011 11:56 pm

RockerMan


WebArtz Technician
WebArtz Technician
Glad I could help Smile


_________________


No support via. PM, as they will just be deleted
http://www.graphics-post.com/

11Accespted Re: Creating Containers Tutorial on Wed Jun 15, 2011 6:36 pm

RockerMan


WebArtz Technician
WebArtz Technician
Tutorial Accepted


_________________


No support via. PM, as they will just be deleted
http://www.graphics-post.com/

12Accespted Re: Creating Containers Tutorial on Wed Jun 15, 2011 8:55 pm

Drogba921


Registered Member
Registered Member
wewt Very Happy Thanks

http://www.codinghelp.org

13Accespted Re: Creating Containers Tutorial on Tue Aug 09, 2011 7:15 pm

Aashik


Registered Member
Registered Member
Hi, the live demo doesn't work anymore.

14Accespted Re: Creating Containers Tutorial on Fri Aug 12, 2011 10:53 pm

experiencesforum


Registered Member
Registered Member
Aashik wrote:Hi, the live demo doesn't work anymore.


thats right, it writen " The web site you are accessing has experienced an unexpected error.
Please contact the website administrator. "

http://experience.forum.st

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum