Announcement

Collapse
No announcement yet.

Centering help

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

  • Centering help

    Ok im lost mabey having a brain fart or mabey i just dunno. I am trying to center the site rather than left justified.. What code do i enter?

    <HTML>
    <HEAD>
    <TITLE>Fierce Graphics</TITLE>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
    </HEAD>
    <BODY BGCOLOR=#FFFFFF LEFTMARGIN=600 TOPMARGIN=300 MARGINWIDTH=0 MARGINHEIGHT=0>
    <!-- Save for Web Slices (Home Pagesliced.psd) -->
    <TABLE ID="Table_01" WIDTH=750 HEIGHT=601 BORDER=0 CELLPADDING=0 CELLSPACING=0>
    <TR>
    <TD>
    <IMG SRC="images/spacer.gif" WIDTH=33 HEIGHT=1 ALT=""></TD>
    <TD>
    <IMG SRC="images/spacer.gif" WIDTH=25 HEIGHT=1 ALT=""></TD>
    <TD>
    <IMG SRC="images/spacer.gif" WIDTH=3 HEIGHT=1 ALT=""></TD>
    <TD>
    <IMG SRC="images/spacer.gif" WIDTH=33 HEIGHT=1 ALT=""></TD>
    <TD>
    <IMG SRC="images/spacer.gif" WIDTH=135 HEIGHT=1 ALT=""></TD>
    <TD>
    <IMG SRC="images/spacer.gif" WIDTH=16 HEIGHT=1 ALT=""></TD>
    <TD>
    <IMG SRC="images/spacer.gif" WIDTH=2 HEIGHT=1 ALT=""></TD>
    <TD>
    <IMG SRC="images/spacer.gif" WIDTH=52 HEIGHT=1 ALT=""></TD>
    <TD>
    <IMG SRC="images/spacer.gif" WIDTH=305 HEIGHT=1 ALT=""></TD>
    <TD>
    <IMG SRC="images/spacer.gif" WIDTH=146 HEIGHT=1 ALT=""></TD>
    </TR>
    <TR>
    <TD COLSPAN=9>
    <IMG SRC="images/Home-Pagesliced_01.gif" WIDTH=604 HEIGHT=77 ALT=""></TD>
    <TD ROWSPAN=10>
    <IMG SRC="images/Home-Pagesliced_02.gif" WIDTH=146 HEIGHT=600 ALT=""></TD>
    </TR>
    <TR>
    <TD COLSPAN=9>
    <IMG SRC="images/Home-Pagesliced_03.gif" WIDTH=604 HEIGHT=19 ALT=""></TD>
    </TR>
    <TR>
    <TD COLSPAN=4 ROWSPAN=2>
    <IMG SRC="images/Home-Pagesliced_04.gif" WIDTH=94 HEIGHT=90 ALT=""></TD>
    <TD>
    <IMG SRC="images/Home-Pagesliced_05.gif" WIDTH=135 HEIGHT=43 ALT=""></TD>
    <TD COLSPAN=4 ROWSPAN=2>
    <IMG SRC="images/Home-Pagesliced_06.gif" WIDTH=375 HEIGHT=90 ALT=""></TD>
    </TR>
    <TR>
    <TD>
    <IMG SRC="images/Home-Pagesliced_07.gif" WIDTH=135 HEIGHT=47 ALT=""></TD>
    </TR>
    <TR>
    <TD ROWSPAN=6>
    <IMG SRC="images/Home-Pagesliced_08.gif" WIDTH=33 HEIGHT=414 ALT=""></TD>
    <TD COLSPAN=5>
    <IMG SRC="images/Home-Pagesliced_09.gif" WIDTH=212 HEIGHT=52 ALT=""></TD>
    <TD COLSPAN=3 ROWSPAN=2>
    <IMG SRC="images/Home-Pagesliced_10.gif" WIDTH=359 HEIGHT=104 ALT=""></TD>
    </TR>
    <TR>
    <TD COLSPAN=5>
    <IMG SRC="images/Home-Pagesliced_11.gif" WIDTH=212 HEIGHT=52 ALT=""></TD>
    </TR>
    <TR>
    <TD ROWSPAN=4>
    <IMG SRC="images/Home-Pagesliced_12.gif" WIDTH=25 HEIGHT=310 ALT=""></TD>
    <TD COLSPAN=5>
    <IMG SRC="images/Home-Pagesliced_13.gif" WIDTH=189 HEIGHT=49 ALT=""></TD>
    <TD COLSPAN=2 ROWSPAN=2>
    <IMG SRC="images/Home-Pagesliced_14.gif" WIDTH=357 HEIGHT=108 ALT=""></TD>
    </TR>
    <TR>
    <TD COLSPAN=5>
    <IMG SRC="images/Home-Pagesliced_15.gif" WIDTH=189 HEIGHT=59 ALT=""></TD>
    </TR>
    <TR>
    <TD ROWSPAN=2>
    <IMG SRC="images/Home-Pagesliced_16.gif" WIDTH=3 HEIGHT=202 ALT=""></TD>
    <TD COLSPAN=5>
    <IMG SRC="images/Home-Pagesliced_17.gif" WIDTH=238 HEIGHT=62 ALT=""></TD>
    <TD ROWSPAN=2>
    <IMG SRC="images/Home-Pagesliced_18.gif" WIDTH=305 HEIGHT=202 ALT=""></TD>
    </TR>
    <TR>
    <TD COLSPAN=5>
    <IMG SRC="images/Home-Pagesliced_19.gif" WIDTH=238 HEIGHT=140 ALT=""></TD>
    </TR>
    </TABLE>
    <!-- End Save for Web Slices -->
    </BODY>
    </HTML>

  • #2
    Nevermind i got it i think....
    <TABLE WIDTH=750 HEIGHT=601 BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0 ID="Table_01">
    <TR>
    <TD>
    <IMG SRC="images/spacer.gif" WIDTH=33 HEIGHT=1 ALT=""></TD>
    <TD>
    <IMG SRC="images/spacer.gif" WIDTH=25 HEIGHT=1 ALT=""></TD>
    <TD>
    <IMG SRC="images/spacer.gif" WIDTH=3 HEIGHT=1 ALT=""></TD>
    <TD>
    <IMG SRC="images/spacer.gif" WIDTH=33 HEIGHT=1 ALT=""></TD>
    <TD>
    <IMG SRC="images/spacer.gif" WIDTH=135 HEIGHT=1 ALT=""></TD>
    <TD>
    <IMG SRC="images/spacer.gif" WIDTH=16 HEIGHT=1 ALT=""></TD>
    <TD>
    <IMG SRC="images/spacer.gif" WIDTH=2 HEIGHT=1 ALT=""></TD>
    <TD>
    <IMG SRC="images/spacer.gif" WIDTH=52 HEIGHT=1 ALT=""></TD>
    <TD>
    <IMG SRC="images/spacer.gif" WIDTH=305 HEIGHT=1 ALT=""></TD>
    <TD>
    <IMG SRC="images/spacer.gif" WIDTH=146 HEIGHT=1 ALT=""></TD>
    </TR>
    <TR>
    <TD COLSPAN=9>
    <IMG SRC="images/Home-Pagesliced_01.gif" WIDTH=604 HEIGHT=77 ALT=""></TD>
    <TD ROWSPAN=10>
    <IMG SRC="images/Home-Pagesliced_02.gif" WIDTH=146 HEIGHT=600 ALT=""></TD>
    </TR>
    <TR>
    <TD COLSPAN=9>
    <IMG SRC="images/Home-Pagesliced_03.gif" WIDTH=604 HEIGHT=19 ALT=""></TD>
    </TR>
    <TR>
    <TD COLSPAN=4 ROWSPAN=2>
    <IMG SRC="images/Home-Pagesliced_04.gif" WIDTH=94 HEIGHT=90 ALT=""></TD>
    <TD>
    <IMG SRC="images/Home-Pagesliced_05.gif" WIDTH=135 HEIGHT=43 ALT=""></TD>
    <TD COLSPAN=4 ROWSPAN=2>
    <IMG SRC="images/Home-Pagesliced_06.gif" WIDTH=375 HEIGHT=90 ALT=""></TD>
    </TR>
    <TR>
    <TD>
    <IMG SRC="images/Home-Pagesliced_07.gif" WIDTH=135 HEIGHT=47 ALT=""></TD>
    </TR>
    <TR>
    <TD ROWSPAN=6>
    <IMG SRC="images/Home-Pagesliced_08.gif" WIDTH=33 HEIGHT=414 ALT=""></TD>
    <TD COLSPAN=5>
    <IMG SRC="images/Home-Pagesliced_09.gif" WIDTH=212 HEIGHT=52 ALT=""></TD>
    <TD COLSPAN=3 ROWSPAN=2>
    <IMG SRC="images/Home-Pagesliced_10.gif" WIDTH=359 HEIGHT=104 ALT=""></TD>
    </TR>
    <TR>
    <TD COLSPAN=5>
    <IMG SRC="images/Home-Pagesliced_11.gif" WIDTH=212 HEIGHT=52 ALT=""></TD>
    </TR>
    <TR>
    <TD ROWSPAN=4>
    <IMG SRC="images/Home-Pagesliced_12.gif" WIDTH=25 HEIGHT=310 ALT=""></TD>
    <TD COLSPAN=5>
    <IMG SRC="images/Home-Pagesliced_13.gif" WIDTH=189 HEIGHT=49 ALT=""></TD>
    <TD COLSPAN=2 ROWSPAN=2>
    <IMG SRC="images/Home-Pagesliced_14.gif" WIDTH=357 HEIGHT=108 ALT=""></TD>
    </TR>
    <TR>
    <TD COLSPAN=5>
    <IMG SRC="images/Home-Pagesliced_15.gif" WIDTH=189 HEIGHT=59 ALT=""></TD>
    </TR>
    <TR>
    <TD ROWSPAN=2>
    <IMG SRC="images/Home-Pagesliced_16.gif" WIDTH=3 HEIGHT=202 ALT=""></TD>
    <TD COLSPAN=5>
    <IMG SRC="images/Home-Pagesliced_17.gif" WIDTH=238 HEIGHT=62 ALT=""></TD>
    <TD ROWSPAN=2>
    <IMG SRC="images/Home-Pagesliced_18.gif" WIDTH=305 HEIGHT=202 ALT=""></TD>
    </TR>
    <TR>
    <TD COLSPAN=5>
    <IMG SRC="images/Home-Pagesliced_19.gif" WIDTH=238 HEIGHT=140 ALT=""></TD>
    </TR>
    </TABLE>

    Comment


    • #3
      May I be the first to say that your code is wildly out dated (not to mention auto-generated). Your align="center" code works yes, but is considered deprecated, which means if browser makers are doing their job, they will loose support for that code. AKA it won't work as browsers are updated to newer versions.

      I suggest you learn how to make webpages with an updated style of tableless layout. Its much tighter code and is easier to update (as it doesn't require endless table rows and cells, spacer gifs, or page slices.

      What you need is this:

      HTML Code:
      <div id="container">
      ...Page contents...
      </div>
      CSS:

      Code:
      #container {
      width: 750px;
      margin: 0 auto;
      }
      www.cibgraphics.com

      Comment


      • #4
        Good to use a outer and inner container so that text-align: center can easily be applied to center in <= IE6. Otherwise, you would need to target each direct child of the root level container and place text-align: left and add text-align: center to the root #container. But yeah your mark-up is a nightmare. Presentation is much easier achieved when you have nice flexible, semantic and valid document.

        Comment

        Search

        Collapse

        Advertisement

        Collapse

        Latest Topics

        Collapse


        GDF A division of Mediabistro Holdings Adweek | Mediabistro | Clio | Film Expo Group Contact Us | Terms of Use | Privacy Policy Copyright 2016 Mediabistro Holdings
        Working...
        X