Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Dec 2008
    Posts
    58
    Thanks
    6
    Thanked 0 Times in 0 Posts

    wraps/containers?

    might sound dumb but how do i make a container in css?

    i have been givin a code containing a wrapper/container on this forum but i am wanting to know how to code them myself. anyone have a tutorial or link to how to learn it?

  • #2
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by plattenumdesign View Post
    might sound dumb but how do i make a container in css?

    i have been givin a code containing a wrapper/container on this forum but i am wanting to know how to code them myself. anyone have a tutorial or link to how to learn it?
    with css you only modify a wrapper/container build using html. For example you can build a container using div and add a class or a id attribute and then use class or id to style it how you want.

    html:
    Code:
    <div id="wrp">
    ...your content here
    </div>
    css:
    Code:
    #wrp {
       position: relative;
       margin: auto;
    }
    the code depend of what you want to do, there is no special recipe.

    best regards

  • #3
    Regular Coder
    Join Date
    Nov 2008
    Posts
    317
    Thanks
    159
    Thanked 0 Times in 0 Posts
    You can also add stuff to the CSS like a border:
    Code:
    #wrp {
       position: relative;
       margin: auto;
       border: 3px solid #808080;
       padding: 4px;
    }
    ...to give it that "container" look

  • #4
    New Coder
    Join Date
    Dec 2008
    Posts
    58
    Thanks
    6
    Thanked 0 Times in 0 Posts
    ok what about changing the width of the container and adding another container on each side?

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by plattenumdesign View Post
    ok what about changing the width of the container and adding another container on each side?
    Maybe you should check out some of the free layouts that are available all over the internet. Have a look at some of these
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #6
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Lots of help here.

    and also here. W3 Schools.

    Frank
    Last edited by effpeetee; 02-19-2009 at 11:27 AM.
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •