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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Creating three images: first on left, second centered, third on right.

    <table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td><img src="http://www.computerhope.com/logo.gif"></td>
    <td><p align="center"><img src="http://www.computerhope.com/logo.gif"></td>
    <td align="right"><img src="http://www.computerhope.com/logo.gif"></td>
    </tr>

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,637
    Thanks
    6
    Thanked 1,004 Times in 977 Posts
    Is that supposed to be a question or an example of how not to do it?

  • #3
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,627
    Thanks
    0
    Thanked 648 Times in 638 Posts
    That's perfectly valid HTML 3.2 and so only needs to be replaced if you are expecting people to use browsers created after 1997.

    The modern equivalent would be:

    Code:
    <div class="tabl">
     <div id="cell1" class="cell"><img src="http://www.computerhope.com/logo.gif" src="xxx"></div>
     <div id="cell2" class="cell"><img src="http://www.computerhope.com/logo.gif" src="xxx"></div>
     <div id="cell3"class="cell"><img src="http://www.computerhope.com/logo.gif" src="xxx"></div>
     </div>
    and CSS to style it:

    Code:
    .tabl {display:table; width:100%;borders:0;}
    .cell {display:table-cell; width:33%;}
    #cell2 {text-align:center;}
    #cell3 {text-align:right;}
    If you need to support both modern browsers and antiquated ones such as IE7 then you'd need to float the divs containing the images instead.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #4
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    831
    Thanks
    10
    Thanked 79 Times in 77 Posts
    Might like this one.
    ☠ ☠RON☠ ☠


  •  

    Posting Permissions

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