1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Table isn't centered properly

Discussion in 'HTML & Website Design' started by paul_whiting09, Jan 28, 2015.

  1. #1
    My table in my portfolio isn't centering properly. In chrome it is a bit too much to the left when in firefox it's a bit too much to the right. Any ideas? Here is my html code for the portfolio.

    
    <p style="text-align: center;"> </p>
    <table style="height: 265px; margin-left: auto; margin-right: auto;" width="1013">
    <tbody>
    <tr>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td style="text-align: center;">
    <p><img src="images/quest_design_web_gallery_header.png" alt="" /></p>
    <p> </p>
    </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td> </td>
    <td> </td>
    <td><a href="img/image-1.jpg" data-lightbox="web" data-title="This is first image caption"><img style="display: block; margin-left: auto; margin-right: auto;" src="images/thumbnail.png" alt="Thumbnail" border="0" /></a></td>
    <td><a href="img/image-2.jpg" data-lightbox="web" data-title="This is second image caption"><img style="display: block; margin-left: auto; margin-right: auto;" src="images/thumbnail.png" alt="Thumbnail" border="0" /></a></td>
    <td><a href="img/image-3.jpg" data-lightbox="web" data-title="This is third image caption"><img style="display: block; margin-left: auto; margin-right: auto;" src="images/thumbnail.png" alt="Thumbnail" border="0" /></a></td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td style="text-align: left;">
    <p> </p>
    <p><img style="display: block; margin-left: auto; margin-right: auto;" src="images/quest_design_design_gallery_header.png" alt="" /></p>
    <p> </p>
    </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td> </td>
    <td> </td>
    <td><a href="img/image-1.jpg" data-lightbox="design" data-title="This is first image caption"><img style="display: block; margin-left: auto; margin-right: auto;" src="images/thumbnail.png" alt="Thumbnail" border="0" /></a></td>
    <td><a href="img/image-2.jpg" data-lightbox="web" data-title="This is second image caption"><img style="display: block; margin-left: auto; margin-right: auto;" src="images/thumbnail.png" alt="Thumbnail" border="0" /></a></td>
    <td><a href="img/image-3.jpg" data-lightbox="web" data-title="This is third image caption"><img style="display: block; margin-left: auto; margin-right: auto;" src="images/thumbnail.png" alt="Thumbnail" border="0" /></a></td>
    <td>   </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td style="text-align: center;">
    <p> </p>
    <p><img src="images/quest_design_image_gallery_header.png" alt="" /></p>
    </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td> </td>
    <td> </td>
    <td><br /><a href="img/image-1.jpg" data-lightbox="image" data-title="This is first image caption"><img style="display: block; margin-left: auto; margin-right: auto;" src="images/thumbnail.png" alt="Thumbnail" border="0" /></a></td>
    <td><br /><a href="img/image-2.jpg" data-lightbox="image" data-title="This is second image caption"><img style="display: block; margin-left: auto; margin-right: auto;" src="images/thumbnail.png" alt="Thumbnail" border="0" /></a></td>
    <td><br /><a href="img/image-3.jpg" data-lightbox="image" data-title="This is third image caption"><img style="display: block; margin-left: auto; margin-right: auto;" src="images/thumbnail.png" alt="Thumbnail" border="0" /></a></td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    </tbody>
    </table>
    <p style="text-align: center;"> </p>
    
    Code (markup):
    Any help would be great.

    http://www.webbmaster.com.au/web-programs/questdesign/index.php/folio
     
    paul_whiting09, Jan 28, 2015 IP
  2. COBOLdinosaur

    COBOLdinosaur Active Member

    Messages:
    515
    Likes Received:
    123
    Best Answers:
    11
    Trophy Points:
    95
    #2
    Does a Chevy look like a Ford? They have common elements, but they have different designs. It is no different with browser manufacturers. they are both to spec, but they do the math a little differently. To compound the problem it looks like you are using a table to manage layout like it is still the 20 century. Even if the table content you are going to get differences in table presenentation, because since the very origins of browser technology there has always been differences in how tables are rendered.

    Now the good news. No one but you gives a damn of even notices. I don't know of any common practice where users open multiple browsers for a site so they can catch developers with page rendering that is not identical across platforms.
     
    COBOLdinosaur, Jan 29, 2015 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #3
    What COBOLdinosaur is trying to say is "what the devil are you using tables for layout for?" -- this is 2015 not 1997. Paragraphs for nothing, tables for layout, static style in the markup, attributes like BORDER that have no business on any website written after 1997, the telltales of a ineptly coded lightbox implementation with those stupid malfing data- attributes (Making it funny to see the bleeding edge of HTML 5 with the bleeding edge of 1997 code - pretty much proving what I've been saying about HTML 5)

    You have a laundry list of how not to build a website -- are you actually writing code that way, or has some rubbish WYSIWYG saddled you with that junk?
     
    deathshadow, Jan 31, 2015 IP