Announcement

Collapse
No announcement yet.

Site Alignment

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Site Alignment

    Hi, Can anyone tell me how I go about fixing the width of my whole site to 1000 pixels and then centering it????????

    #2
    You could use a table

    The following will center your site with a blue bakground to the surrounding area

    Insert the following just after your body tag just like this
    Code:
    <body>
    <table width="100%"  align="center">
    <tr> 
    <td  bgcolor="#000066"></td>
    <td width="1000px" align="center">
    Then insert the following just before your body tag closes

    Code:
        
    </td>
    <td  bgcolor="#000066"></td>
    </tr>
    </table>	
    </body>
    You will have to do this for both your catalog template and your broucher template

    Thanks Paul
    Paul Hesford
    Web Design Wigan

    Based in the Northwest of England UK, provides web design, programming, e-commerce and web hosting services

    Cheap Whey Protein from Powerbeck
    Web Designer in Wigan
    Actinic Hosting
    Dog Kennels and Runs

    Comment


      #3
      If you were mad and wanted to do many things wrong

      Comment


        #4
        Originally posted by leehack
        indeed

        How about a 15 second hack in CSS? This has been covered before and precludes the need for tables.


        Bikster
        SellerDeck Designs and Responsive Themes

        Comment


          #5
          Matthew what's your URL so we can see if CSS or table layout. Whatever you do, do not follow that above advice, it's so wrong on so many levels.

          Comment


            #6
            Blush

            Hi

            Ok could you please show me how the css method also

            i have used the above seems to work OK

            why is it so wrong

            Thanks Paul
            Paul Hesford
            Web Design Wigan

            Based in the Northwest of England UK, provides web design, programming, e-commerce and web hosting services

            Cheap Whey Protein from Powerbeck
            Web Designer in Wigan
            Actinic Hosting
            Dog Kennels and Runs

            Comment


              #7
              CSS in a nutshell :

              wrap all your code between the <body> and </body> into a div eg:

              <div id="pageWrapper"> ... </div>

              and then in the actinic stylesheet something like:

              #pageWrapper {
              width: 1000px;
              margin 0 auto;
              border: none;
              padding: 0;
              }


              Bikster
              SellerDeck Designs and Responsive Themes

              Comment


                #8
                Originally posted by paulhesford
                why is it so wrong
                For lots of reasons Paul, a few below:
                1. You are advising him to insert code that includes a body tag, below his body tag (prime spot for a double body tag mistake by a noob).
                2. Your table is missing the cellspacing and cellpadding attributes.
                3. You are using a table to center a site when CSS can do it all for you.
                4. You have added 'px' into the <td> width.
                5. You are colouring a table cell to get a background color, both actinic theme config or the normal body tag offer this facility in a much better manner.


                If you have an outer table layout, then give the table an ID, such as:

                <table id="outerWrapper" cellpadding="0" cellspacing="0">

                and add to the css stylesheet:

                #outerWrapper {
                width: 1000px;
                margin: 0 auto;
                border: none;
                padding: 0;
                }

                You are basically advising the addition of an extra table when there is no need as you can style the current one(s) and more important than that it's just a bad way to do things to be honest, it's inefficient, its code bloat for no reasons and just add to an ever growing list of nested tables in an actinic site.

                If CSS layout, then the above is simpler still, it all depends on how your site is laid out currently as to what you decide to use, but tables are the last choice to achieve it.

                Comment


                  #9
                  So...

                  <div id="webbg">

                  <div id="pageWrapper"> ... </div>

                  </div>
                  and then in the actinic stylesheet something like:

                  #webbg (
                  width: 100%;
                  margin 0 auto;
                  border: none;
                  padding: 0;
                  background-color: #000066

                  #pageWrapper {
                  width: 1000px;
                  margin 0 auto;
                  border: none;
                  padding: 0;
                  }

                  Or can I edit pageWrapper to do this for me

                  Thanks

                  p.s. why dont people like tables anymore?
                  Paul Hesford
                  Web Design Wigan

                  Based in the Northwest of England UK, provides web design, programming, e-commerce and web hosting services

                  Cheap Whey Protein from Powerbeck
                  Web Designer in Wigan
                  Actinic Hosting
                  Dog Kennels and Runs

                  Comment


                    #10
                    Originally posted by paulhesford
                    p.s. why dont people like tables anymore?
                    As an IT professional building websites for others you surely know why?


                    Bikster
                    SellerDeck Designs and Responsive Themes

                    Comment


                      #11
                      Joint

                      Ahh thanks for pointing that out

                      erm well maybe you could help me a little more, could you sum it up in a brief sentence?


                      Paul
                      Paul Hesford
                      Web Design Wigan

                      Based in the Northwest of England UK, provides web design, programming, e-commerce and web hosting services

                      Cheap Whey Protein from Powerbeck
                      Web Designer in Wigan
                      Actinic Hosting
                      Dog Kennels and Runs

                      Comment


                        #12
                        Paul,
                        Are you not being a bit lazy here?

                        The internet is your friend for when you have a question you know, especially ones that have been asked before!
                        Search for it
                        Fergus Weir - teclan ltd
                        Ecommerce Digital Marketing

                        SellerDeck Responsive Web Design

                        SellerDeck Hosting
                        SellerDeck Digital Marketing

                        Comment


                          #13
                          erm well maybe you could help me a little more, could you sum it up in a brief sentence
                          God - even I know the answer to that one and Im the tables king

                          Comment


                            #14
                            The URL is www.craftcompany.co.uk. I beleive its a table based site! Also any instruction on where to add this code your all arguing about would be very helpful! thank you please

                            Comment


                              #15
                              You have set the outer table to be 1000 wide, but you then have the top row of the site set to be 1270 wide which then overrides your setting. Remove the 1270 and also reduce your banner size, how do you expect a site to reduce to 1000 wide if you are putting a 1270 wide image inside it?

                              I know the code can look a little confusing, but there is a very basic logic to follow. If you have a 30" wide door frame, can you fit a 40" box through it? It's an identical logic with web design.

                              Comment

                              Working...
                              X