Community discussion forum

HTML table problem

Tags: .net, css Belgium
  • 1 year ago

    I'm working an a website, and i wanted to create a structure using a table. But for some reason it doesn't really look like i want it to. The second and third line for example are not on 25%. Can anyone help me out here, The code is the following:

     

     

    <table border="1" width="100%">
                <tr width="100%">
                    <td width="100%">
                        <img src="../../../images/activetext.PNG" alt="ActiveText" border="0">
                    </td>
                </tr>
                <tr width="100%">
                    <td width="25%">
                        <b>
                            Date added:
                        </b>
                    </td>
                    <td width="25%">
                        <b>
                            Requirements:       
                        </b>
                    </td>
                    <td width="25%">
                        <b>
                            License:
                        </b>
                    </td>
                    <td width="25%">
                        <b>
                            File size:
                        </b>
                    </td>
                </tr>
                <tr width="100%">
                    <td width="25%">
                        May 21st 2007
                    </td>
                    <td width="25%">
                        .Net Framework 1.1 or higher
                    </td>
                    <td width="25%">
                        Freeware
                    </td>
                    <td width="25%">
                        93,5 kb
                    </td>
                </tr>
                <tr width="100%">
                    <td width="100%">
                        <b>
                            About ActiveText:
                        </b>
                    </td>
                </tr>
                <tr width="100%">
                    <td width="100%">
                        ActiveText is a simple text editor, very similar to notepad.
                    </td>
                </tr>
                <tr width="100%">
                    <td width="100%">
                        <b>
                            History
                        </b>
                    </td>
                </tr>
                <tr width="100%">
                    <td width="100%">
                        26/12/06 - V 1
                        <br />05/02/07 - V 2    Adds the Read function
                        <br />21/05/07 - V 2.1 Fixes the e-mail bug
                    </td>
                </tr>
                <tr width="100%">
                    <td width="100%">
                        <b>
                            Format
                        </b>
                    </td>
                </tr>
                <tr width="100%">
                    <td width="100%">
                        .ZIP
                    </td>
                </tr>
                <tr width="100%">
                    <td width="100%">
                        De Creative Commons Naamsvermelding-Geen Afgeleide werken 2.0 BelgiĆ« Licentie is van toepassing op dit werk. Ga naar http://creativecommons.org/licenses/by-nd/2.0/be/ of stuur een brief naar Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, VS om deze licentie te bekijken.
                    </td>
                </tr
            </table>

  • 1 year ago

     try this:

     

    <table border="1" style="width:100%">
                <tr>
                    <td colspan="4">
                        <img src="../../../images/activetext.PNG" alt="ActiveText" style="border:0" />
                    </td>
                </tr>
                <tr style="width:100%">
                    <td style="width:25%">
                        <b>
                            Date added:
                        </b>
                    </td>
                    <td style="width:25%">
                        <b>
                            Requirements:      
                        </b>
                    </td>
                    <td style="width:25%">
                        <b>
                            License:
                        </b>
                    </td>
                    <td style="width:25%">
                        <b>
                            File size:
                        </b>
                    </td>
                </tr>
                <tr style="width:100%">
                    <td style="width:25%">
                        May 21st 2007
                    </td>
                    <td style="width:25%">
                        .Net Framework 1.1 or higher
                    </td>
                    <td style="width:25%">
                        Freeware
                    </td>
                    <td style="width:25%">
                        93,5 kb
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <b>
                            About ActiveText:
                        </b>
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        ActiveText is a simple text editor, very similar to notepad.
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <b>
                            History
                        </b>
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        26/12/06 - V 1
                        <br />05/02/07 - V 2    Adds the Read function
                        <br />21/05/07 - V 2.1 Fixes the e-mail bug
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <b>
                            Format
                        </b>
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        .ZIP
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        De Creative Commons Naamsvermelding-Geen Afgeleide werken 2.0 BelgiĆ« Licentie is van toepassing op dit werk. Ga naar http://creativecommons.org/licenses/by-nd/2.0/be/ of stuur een brief naar Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, VS om deze licentie te bekijken.
                    </td>
                </tr>
            </table>

     Joe

    PS. 25% etc is always relative to 'window' size so it may not always look "correct".
     

  • 1 year ago

     The important things to consider here are:

    1. how that will look in high resolutions 

    2. with widescreen monitors, the size of the windows changes in pixels, but remains the same in % meaning that some objects may significantly change place (it matters especially if you use any graphics) 

     

    Jake 

Post a reply

Enter your message below

Sign in or Join us (it's free).

Want to stay in touch with what's going on? Follow us on twitter!