I need help centering my web page""

Discussion in 'HTML & Website Design' started by Aaron111, Mar 8, 2008.

  1. #1
    Aaron111, Mar 8, 2008 IP
  2. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try this.

    
    body {
    	margin: 0 auto;
    	width: 970px;
    }
    
    Code (markup):
    Either that or give the first table in your page an ID and assign the style rules to that instead.
     
    Dan Schulz, Mar 8, 2008 IP
  3. Aaron111

    Aaron111 Well-Known Member

    Messages:
    4,301
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    185
    #3
    Im not CSS friendly""
     
    Aaron111, Mar 8, 2008 IP
  4. portmaccer

    portmaccer Peon

    Messages:
    17
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yeah, can be confusing. Try this - in your page near the top of the code look for:


    <style type="text/css">
    <!--


    And then add this in the next line:


    #wrapper {
    margin: 0 auto;
    width: 970px;
    }


    and then look for the body tag:

    <body bgcolor="90A3CB" link="#006699" vlink="#006699" alink="#006699" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

    and in the next line directly below add:



    <div id="warpper">



    And then go down the bottom of the page and look for:

    </body> well, in the line directly above it put:

    </div>


    And that's it. :)
     
    portmaccer, Mar 8, 2008 IP
  5. Aaron111

    Aaron111 Well-Known Member

    Messages:
    4,301
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    185
    #5
    Aaron111, Mar 9, 2008 IP
  6. donniedarko

    donniedarko Member

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #6
    You've made a typo while opening your div in the body:
    <div id="warpper">
    Code (markup):
    should be
    <div id="wrapper">
    Code (markup):
     
    donniedarko, Mar 9, 2008 IP
  7. Aaron111

    Aaron111 Well-Known Member

    Messages:
    4,301
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    185
    #7
    In which string can I find this error??? give me a coded area
     
    Aaron111, Mar 9, 2008 IP
  8. portmaccer

    portmaccer Peon

    Messages:
    17
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    :eek: Sorry about that Aaron111 and thanks donniedarko!

    It's funny, isn't it, we can come up with some great complicated solutions in life, but then we make the most basic silly mistakes. Well, I do.

    Aaron111, in case you haven't found my spelling error, (I think you are using Dreamweaver?) just do a search for "warpper". But it should be just below the <body> tag.
     
    portmaccer, Mar 9, 2008 IP
  9. benetonas123

    benetonas123 Guest

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    your design bad you need to change ;)
     
    benetonas123, Mar 9, 2008 IP
  10. Aaron111

    Aaron111 Well-Known Member

    Messages:
    4,301
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    185
    #10
    I did not know DW had a search button?? thats new where is this"" unless you mean code search my self;)
     
    Aaron111, Mar 9, 2008 IP
  11. donniedarko

    donniedarko Member

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #11
    The search function can be enabled by holding CTRL+F on your keyboard.


    The warpper typo is a few lines after you close head

    </style>
    </head>
    <body bgcolor="90A3CB" link="#006699" vlink="#006699" alink="#006699" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    [B]<div id="warpper">[/B]
    <table width="970" border="0" cellspacing="0" cellpadding="0">
      <tr> 
    Code (markup):
     
    donniedarko, Mar 9, 2008 IP
  12. Aaron111

    Aaron111 Well-Known Member

    Messages:
    4,301
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    185
    #12
    donniedarko

    I did this but when I stretch the browser the error still their?? ;) please check code
     
    Aaron111, Mar 9, 2008 IP
  13. SitPoMk

    SitPoMk Peon

    Messages:
    457
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Aaron - your code needs work but from what I can see you fixed the wrapper typo but for some reason you commented out your CSS so there is no styling being applied to the site.

    #wrapper {
    margin: 0 auto;
    width: 970px;
    }

    Should work if you uncomment it lol.
     
    SitPoMk, Mar 9, 2008 IP
  14. Aaron111

    Aaron111 Well-Known Member

    Messages:
    4,301
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    185
    #14
    SitPoMk
    regard homie"
    exactly where does this fit in to the code??
     
    Aaron111, Mar 9, 2008 IP
  15. SitPoMk

    SitPoMk Peon

    Messages:
    457
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #15
    you have it right on your code just uncomment it by deleting the
    <!--
    Code (markup):
    and
    -->
    Code (markup):
    near the beginning of the code
     
    SitPoMk, Mar 9, 2008 IP