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 14 of 14
  1. #1
    New Coder
    Join Date
    Dec 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How do i make the content float in the middle?

    I know I messed the title up but here is an example of what i mean.
    http://www.templatesfreelance.com/pr...&y=36&idtem=39

    I don't wanna make a site like that I have just forgotten how do that, and if someone could tell me or give me a code that would be great thanks in advance.

    -Shades, Admin.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Are you asking how to center a site?

  • #3
    New Coder
    Join Date
    Dec 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There thats a better way of putting it, thank you, and yes I guess thats what I'm asking, and if u could shed some light on this I would be most grateful.

    -Shades,

  • #4
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Not really a JavaScript question. Over to the HTML&CSS forum.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #5
    New Coder
    Join Date
    Dec 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Quote Originally Posted by Shades
    There thats a better way of putting it, thank you, and yes I guess thats what I'm asking, and if u could shed some light on this I would be most grateful.

    -Shades,
    Well the ideal way would be to use the CSS property margin:auto;, here is a little example.
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Centering using CSS property margin:auto</title>
    <style type="text/css">
    html, body {
    margin:0;
    padding:0;
    background:#CCC;
    color:#FFF;
    text-align:center;
    }
    #container1 {
    width:780px;
    height:300px;
    margin:10px auto;
    background:#F00;
    color:#000;
    border:1px solid #000;
    }
    #container2 {
    width:600px;
    height:300px;
    margin:10px auto;
    background:#00F;
    color:#000;
    border:1px solid #000;
    }
    #container2 td {
    vertical-align:top;
    }
    </style>
    </head>
    
    <body>
    <div id="container1">Content</div>
    <table id="container2" border="0" cellpadding="0" cellspacing="0">
    	<tr>
    		<td>Content</td>
    	</tr>
    </table>
    </body>
    </html>

  • #7
    Regular Coder
    Join Date
    Dec 2005
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    this works in every browser right

  • #8
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Quote Originally Posted by glish_dreams
    this works in every browser right
    Yeah as long as you have this part
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    It will work in the latest browsers.

  • #9
    New Coder
    Join Date
    Dec 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes thank you thats helpful and all but it still doesn't center it....or am I missing something?

  • #10
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    I have no idea what your code looks like. Post your code or a link to your site.

  • #11
    Regular Coder
    Join Date
    Dec 2005
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by _Aerospace_Eng_
    Yeah as long as you have this part
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    It will work in the latest browsers.


    yea i noticed that line of code alot today.. and even FrontPage03 has it in the saved most used codes

    wtf does it mean and do...?

  • #12
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    It tells the browser how to handle the code and where to get the coding rules for the document. Here is a list of possible doctypes. The strict doctypes tend to make browsers display code a bit better.

  • #13
    New to the CF scene
    Join Date
    Dec 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Shades
    I know I messed the title up but here is an example of what i mean.
    http://www.templatesfreelance.com/pr...&y=36&idtem=39

    I don't wanna make a site like that I have just forgotten how do that, and if someone could tell me or give me a code that would be great thanks in advance.
    -Shades, Admin.

    Hello Dear Admin,

    I am Senior HTML Coder/ Quality Control Supervisor from FreeLance City Inc.
    I find this link in my web site statistics and because I don`t understand what you mean. You can send your question to support@templatesfreelance.com
    I try to help you.

    Best Regards

  • #14
    New Coder
    Join Date
    Dec 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh hello, the admin. wasn't asking the question I was, I think I can find it here, I wouldn't want to bother you, your a web template designer, not a coding support group but thank you none the less.


  •  

    Posting Permissions

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