Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back a page or two to re-sync the thread and this will then show latest posts. Thanks, Mike.

Design looks different in browser??

  • 23-02-2009 6:02pm
    #1
    Closed Accounts Posts: 1,663 ✭✭✭


    Hi all. Dabbling in a bit of very basic web design and have encountered a problem.

    The design I have in Dreamweaver does not appear the same when looked at in any browser. All of the tables are out of place. Here is the code;

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
    <html xmlns="http://www.w3.org/1999/xhtml"&gt;
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>

    <body>
    <table width="200" height="612" border="0" align="center">
    <tr>
    <td height="142"><img src="header.png" width="750" height="140" /></td>
    </tr>
    <tr>
    <td height="27"><table width="200" border="0" align="center">
    <tr>
    <td>A</td>
    <td>B</td>
    <td>C</td>
    <td>D</td>
    <td>E</td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td> </td>
    </tr>
    </table>
    </body>
    </html>

    In Dreamweaver, the A B C D E (intended to be place for buttons when done) are directly under the banner image. Yet, when viewed in a browser, there is a huge empty gap between the two. Any ideas??

    Thanks in advance :D


Comments

  • Registered Users, Registered Users 2 Posts: 742 ✭✭✭Pixelcraft


    for starters you're trying to fit an image with width of 750 into a table with a width of 200. Also, tables are bad for this! Learn CSS, as learning this way will be of no real benefit.


  • Registered Users, Registered Users 2 Posts: 8,488 ✭✭✭Goodshape


    You shouldn't really be using tables for this sort of layout but..

    try specifying the cellspacing and/or cellpadding on the table tag.

    <table width="200" height="612" border="0" align="center" cellspacing="0" cellpadding="0">


  • Closed Accounts Posts: 7,145 ✭✭✭DonkeyStyle \o/


    Remove the height attribute from the outer table, then if you need to you can add a height attribute here
    <td> </td>


  • Closed Accounts Posts: 1,663 ✭✭✭evil-monkey


    Goodshape wrote: »
    You shouldn't really be using tables for this sort of layout but..

    try specifying the cellspacing and/or cellpadding on the table tag.

    <table width="200" height="612" border="0" align="center" cellspacing="0" cellpadding="0">

    I shouldn't?? Cool. Any suggestions on what I should use??


  • Registered Users, Registered Users 2 Posts: 742 ✭✭✭Pixelcraft


    CSS as I mentioned above.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 8,488 ✭✭✭Goodshape


    Yup, CSS - cascading style sheets.

    It allows you to keep your HTML tidy and your style separated for easy maintenance and use across multiple pages.

    The HTML (minus CSS/style) for something like this should be similar to the following, with all style related information such as height, width, padding, spacing, colour, etc. going into a separate "style sheet".
    <body>
        
        <div id="pageWrap">
            <div id="header">
                <img src="header.png" alt="Name of my website" />    
                <ul id="menuButtons">
                    <li><a href="#">A</a></li>
                    <li><a href="#">B</a></li>
                    <li><a href="#">C</a></li>
                    <li><a href="#">D</a></li>
                    <li><a href="#">E</a></li>
                </ul>
            </div>
            
            <div id="content">
                Hello.
            </div>
        </div>
        
    </body>
    

    That on it's own will look very plain but with added CSS the possibilities are vast.


  • Registered Users Posts: 197 ✭✭pauldiv


    Yes much better to learn css. Tables were used for layout in the first few years of web design and desingers use css now mostly. Tables can make your pages heavy too and it is a nighmare to inspect the code looking for faults like you are describing.


Advertisement